mirror of
https://github.com/ansible/awx.git
synced 2026-03-23 11:55:04 -02:30
Fix an issue where azure inventory plugin would throw an error if there
were no instances available
This commit is contained in:
@@ -100,9 +100,10 @@ class AzureInventory(object):
|
|||||||
|
|
||||||
# Add the `_meta` information.
|
# Add the `_meta` information.
|
||||||
_meta = {}
|
_meta = {}
|
||||||
for host in set(reduce(lambda x, y: x + y,
|
if len(data) > 0:
|
||||||
[i for i in data.values()])):
|
for host in set(reduce(lambda x, y: x + y,
|
||||||
_meta[host] = self.get_host(host, jsonify=False)
|
[i for i in data.values()])):
|
||||||
|
_meta[host] = self.get_host(host, jsonify=False)
|
||||||
data['_meta'] = _meta
|
data['_meta'] = _meta
|
||||||
|
|
||||||
# JSONify the data.
|
# JSONify the data.
|
||||||
|
|||||||
Reference in New Issue
Block a user