mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixed issue with null host vars
This commit is contained in:
parent
27033915cc
commit
04868c22b7
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@ class InventoryModule(BaseFileInventoryPlugin):
|
||||||
if 'hosts' in group_data:
|
if 'hosts' in group_data:
|
||||||
for host_pattern in group_data['hosts']:
|
for host_pattern in group_data['hosts']:
|
||||||
hosts, port = self._parse_host(host_pattern)
|
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:
|
else:
|
||||||
self.display.warning("Skipping '%s' as this is not a valid group name" % group)
|
self.display.warning("Skipping '%s' as this is not a valid group name" % group)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue