Fixing azure_rm_containerregistry_facts (#45897)

* fixing cr facts

* final fix?

* fixed

* syntax

* sanity
pull/45942/head
Zim Kalinowski 6 years ago committed by GitHub
parent 5a3000af19
commit 60979a96a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save