mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Load parent groups when processing group_vars
This commit is contained in:
parent
ded0c61750
commit
6de8c27085
3 changed files with 15 additions and 2 deletions
|
@ -226,7 +226,8 @@ class Play(object):
|
|||
if (host is not None):
|
||||
inventory = self.playbook.inventory
|
||||
hostrec = inventory.get_host(host)
|
||||
groups = [ g.name for g in hostrec.groups ]
|
||||
groupz = sorted(inventory.groups_for_host(host), key=lambda g: g.depth)
|
||||
groups = [ g.name for g in groupz ]
|
||||
basedir = inventory.basedir()
|
||||
if basedir is not None:
|
||||
for x in groups:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue