mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fix the get_hosts() error in get_groups returning a dict not a list of group objects
This commit is contained in:
parent
dcbe48e2d4
commit
279e5e4522
1 changed files with 8 additions and 8 deletions
|
@ -73,7 +73,7 @@ class Inventory(object):
|
|||
hosts = {}
|
||||
patterns = pattern.replace(";",":").split(":")
|
||||
|
||||
for group in self.get_groups():
|
||||
for (groupname, group) in self.get_groups().items():
|
||||
for host in group.get_hosts():
|
||||
for pat in patterns:
|
||||
if group.name == pat or pat == 'all' or self._match(host.name, pat):
|
||||
|
|
Loading…
Add table
Reference in a new issue