From e217ab00c02323998ce244045e88186d4334535a Mon Sep 17 00:00:00 2001 From: Chris Church Date: Tue, 30 Jun 2015 16:33:11 -0400 Subject: [PATCH] Fix azure inventory to set ['_meta']['hostvars'] instead of just ['meta']. --- awx/plugins/inventory/windows_azure.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/awx/plugins/inventory/windows_azure.py b/awx/plugins/inventory/windows_azure.py index dede09d179..89d11ede07 100755 --- a/awx/plugins/inventory/windows_azure.py +++ b/awx/plugins/inventory/windows_azure.py @@ -100,14 +100,14 @@ class AzureInventory(object): if self.args.host: data_to_print = self.get_host(self.args.host) else: - # Add the `_meta` information. - _meta = {} + # Add the `['_meta']['hostvars']` information. + hostvars = {} if len(data) > 0: for host in set(reduce(lambda x, y: x + y, [i for i in data.values()])): if host is not None: - _meta[host] = self.get_host(host, jsonify=False) - data['_meta'] = _meta + hostvars[host] = self.get_host(host, jsonify=False) + data['_meta'] = {'hostvars': hostvars} # JSONify the data. data_to_print = self.json_format_dict(data, pretty=True)