From 60979a96a93dac21fb6107519804d8fcd55bccf9 Mon Sep 17 00:00:00 2001 From: Zim Kalinowski Date: Thu, 20 Sep 2018 16:58:07 +0800 Subject: [PATCH] Fixing azure_rm_containerregistry_facts (#45897) * fixing cr facts * final fix? * fixed * syntax * sanity --- .../cloud/azure/azure_rm_containerregistry_facts.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_containerregistry_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_containerregistry_facts.py index 0eb1f8c47d..cea2ea2a22 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_containerregistry_facts.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_containerregistry_facts.py @@ -243,7 +243,14 @@ class AzureRMContainerRegistryFacts(AzureRMModuleBase): admin_user_enabled = d['admin_user_enabled'] if self.retrieve_credentials and admin_user_enabled: - credentials = self.containerregistry_client.registries.list_credentials(resource_group, name) + credentials = self.containerregistry_client.registries.list_credentials(resource_group, name).as_dict() + for index in range(len(credentials['passwords'])): + password = credentials['passwords'][index] + if password['name'] == 'password': + credentials['password'] = password['value'] + elif password['name'] == 'password2': + credentials['password2'] = password['value'] + credentials.pop('passwords') d = { 'resource_group': resource_group,