azure_rm_rg_info: fix KeyError: 'ansible_facts' (#66729)

* azure_rm_rg_info: fix KeyError: 'ansible_facts'

Fix facts for using old azure_rm_resourcegroup_facts, closes #66727

* fix intendation
This commit is contained in:
Christian Köberl 2020-02-16 17:03:31 +01:00 committed by GitHub
parent ff0576802f
commit 569f0cf808
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -183,7 +183,9 @@ class AzureRMResourceGroupInfo(AzureRMModuleBase):
item['resources'] = self.list_by_rg(item['name'])
if is_old_facts:
self.results['ansible_facts']['azure_resourcegroups'] = result
self.results['ansible_facts'] = dict(
azure_resourcegroups=result
)
self.results['resourcegroups'] = result
return self.results