fixed issue with null host vars

This commit is contained in:
Brian Coca 2017-07-15 00:19:55 -04:00
parent 27033915cc
commit 04868c22b7

View file

@ -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)