You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
572 B
14 lines
572 B
diff --git a/salt/roster/ansible.py b/salt/roster/ansible.py
|
|
index f4a2a23e0b..e6b9e80247 100644
|
|
--- a/salt/roster/ansible.py
|
|
+++ b/salt/roster/ansible.py
|
|
@@ -129,7 +129,7 @@ def targets(tgt, tgt_type='glob', **kwargs):
|
|
|
|
def _get_hosts_from_group(group):
|
|
inventory = __context__['inventory']
|
|
- hosts = [host for host in inventory[group].get('hosts', [])]
|
|
+ hosts = [host for host in inventory.setdefault(group, {}).get('hosts', [])]
|
|
for child in inventory[group].get('children', []):
|
|
hosts.extend(_get_hosts_from_group(child))
|
|
return hosts
|