summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZim Kalinowski <zikalino@microsoft.com>2018-09-20 10:58:07 +0200
committerGitHub <noreply@github.com>2018-09-20 10:58:07 +0200
commit60979a96a93dac21fb6107519804d8fcd55bccf9 (patch)
treedf4ccfe00668c23a483321ce9c1262af43ae6966
parentSupport comments in ansible-test flat files. (diff)
downloadansible-60979a96a93dac21fb6107519804d8fcd55bccf9.tar.xz
ansible-60979a96a93dac21fb6107519804d8fcd55bccf9.zip
Fixing azure_rm_containerregistry_facts (#45897)
* fixing cr facts * final fix? * fixed * syntax * sanity
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_containerregistry_facts.py9
1 files changed, 8 insertions, 1 deletions
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,