mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-03 03:42:45 +00:00
Merge pull request #1898 from silviud/fix_inventory_list_groups
Inventory class - lambda fails on attribute access - g.name is a string not the group obje...
This commit is contained in:
@@ -296,7 +296,7 @@ class Inventory(object):
|
||||
return [ h.name for h in self.get_hosts(pattern) ]
|
||||
|
||||
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
|
||||
def get_restriction(self):
|
||||
|
||||
Reference in New Issue
Block a user