ensure all groups inherit from 'all'

This commit is contained in:
Brian Coca 2017-07-13 13:10:22 -04:00 committed by Brian Coca
parent 84367eacef
commit 3a1b84153c

View file

@ -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():