mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
lambda fails on attribute access - g.name is a string not the group object
This commit is contained in:
parent
ef38e9f0e6
commit
f7694ac433
1 changed files with 1 additions and 1 deletions
|
@ -296,7 +296,7 @@ class Inventory(object):
|
||||||
return [ h.name for h in self.get_hosts(pattern) ]
|
return [ h.name for h in self.get_hosts(pattern) ]
|
||||||
|
|
||||||
def list_groups(self):
|
def list_groups(self):
|
||||||
return sorted([ g.name for g in self.groups ], key=lambda x: x.name)
|
return sorted([ g.name for g in self.groups ], key=lambda x: x)
|
||||||
|
|
||||||
# TODO: remove this function
|
# TODO: remove this function
|
||||||
def get_restriction(self):
|
def get_restriction(self):
|
||||||
|
|
Loading…
Reference in a new issue