mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
fixed issue with null host vars
This commit is contained in:
@@ -138,7 +138,7 @@ class InventoryModule(BaseFileInventoryPlugin):
|
||||
if 'hosts' in group_data:
|
||||
for host_pattern in group_data['hosts']:
|
||||
hosts, port = self._parse_host(host_pattern)
|
||||
self.populate_host_vars(hosts, group_data['hosts'][host_pattern], group, port)
|
||||
self.populate_host_vars(hosts, group_data['hosts'][host_pattern] or {}, group, port)
|
||||
else:
|
||||
self.display.warning("Skipping '%s' as this is not a valid group name" % group)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user