aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdynamic.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/dynamic.py b/dynamic.py
index 78ebdb2..4b5cde5 100755
--- a/dynamic.py
+++ b/dynamic.py
@@ -68,7 +68,7 @@ def get_hostvars(host):
Retrieve and build dynamic variables for a specific host.
"""
- data = host.data
+ data = {}
if "ansible_host" not in host.data:
data["ansible_host"] = host.name
return data
@@ -105,8 +105,6 @@ def get_meta(hosts):
_meta["hostvars"] = {}
for hostname, host in hosts.items():
_meta["hostvars"][hostname] = get_hostvars(host)
- # _meta["hostvars"][hostname] = host.data
- return "{}"
return _meta
@@ -133,8 +131,6 @@ def get_list(hosts, groups):
cleangr = host.data["_groups"]
cleangr = [cleangr] if isinstance(cleangr, str) else cleangr
for group in cleangr:
- # skip group assignement on non-existence!
- logging.info(f"searching for group : { group }")
if group not in groups:
logging.error(f"group { group } does not exist!")
continue
remember that computers suck.