mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
ensure all groups inherit from 'all'
This commit is contained in:
parent
84367eacef
commit
3a1b84153c
1 changed files with 4 additions and 0 deletions
|
@ -133,6 +133,10 @@ class InventoryData(object):
|
|||
group = self.groups[g]
|
||||
group_names.add(group.name)
|
||||
|
||||
# ensure all groups inherit from 'all'
|
||||
if group.name != 'all' and not group.get_ancestors():
|
||||
self.add_child('all', group.name)
|
||||
|
||||
host_names = set()
|
||||
# get host vars from host_vars/ files and vars plugins
|
||||
for host in self.hosts.values():
|
||||
|
|
Loading…
Reference in a new issue