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

* 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

(cherry picked from commit 569f0cf808)

* azure_rm_rg_info: add changelog fragment
pull/67986/head
Christian Köberl 6 years ago committed by GitHub
parent 587f241dbf
commit 1b65ecc71a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- azure_rm_resourcegroup_facts - adds the ansible_facts as a sub map to fix the KeyError (https://github.com/ansible/ansible/issues/66727).

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

Loading…
Cancel
Save