mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
update code to python3 (#10903)
* update code to python3 * add changelog frag * rollback adjustment for plugins/lookup/lmdb_kv.py * accept PR suggestion for plugins/module_utils/utm_utils.py * accept PR suggestion for plugins/module_utils/vexata.py * Apply suggestions from code review * Update changelogs/fragments/10903-2to3.yml * Update changelogs/fragments/10903-2to3.yml
This commit is contained in:
@@ -167,13 +167,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||
|
||||
def _add_groups(self):
|
||||
"""Add Linode instance groups to the dynamic inventory."""
|
||||
self.linode_groups = set(
|
||||
filter(None, [
|
||||
instance.group
|
||||
for instance
|
||||
in self.instances
|
||||
])
|
||||
)
|
||||
self.linode_groups = {instance.group for instance in self.instances if instance.group}
|
||||
|
||||
for linode_group in self.linode_groups:
|
||||
self.inventory.add_group(linode_group)
|
||||
|
||||
Reference in New Issue
Block a user