diff options
author | binary <me@rgoncalves.se> | 2021-02-08 14:50:41 +0100 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2021-02-08 14:50:41 +0100 |
commit | 84f7b5b1ac3712c28ee60d5e5bb017e34dc1b950 (patch) | |
tree | a9273f363752d6ee8cccebb3f00590d07c68fb7a | |
parent | e734362a2762a0d255ee247897909e2fa78fbc7d (diff) | |
download | infrastructure-84f7b5b1ac3712c28ee60d5e5bb017e34dc1b950.tar.gz |
Return _meta dict, but with fewer value than expected
-rwxr-xr-x | dynamic.py | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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 |