diff --git a/fablednetmon/ansible/sources.py b/fablednetmon/ansible/sources.py index cb68490..75c948f 100644 --- a/fablednetmon/ansible/sources.py +++ b/fablednetmon/ansible/sources.py @@ -34,8 +34,12 @@ def get_sources(ansible_cfg: dict) -> list[dict]: for src in sources: src_type = src.get("type", "local") if src_type == "git": + if not src.get("url"): + raise ValueError(f"Ansible git source {src['name']!r} is missing required 'url' field") path = str(Path(cache_dir) / src["name"]) else: + if not src.get("path"): + raise ValueError(f"Ansible local source {src['name']!r} is missing required 'path' field") path = src.get("path", "") result.append({ "name": src["name"],