1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fixing azure_rm_containerregistry_facts (#45897)

* fixing cr facts

* final fix?

* fixed

* syntax

* sanity
This commit is contained in:
Zim Kalinowski 2018-09-20 16:58:07 +08:00 committed by GitHub
parent 5a3000af19
commit 60979a96a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -243,7 +243,14 @@ class AzureRMContainerRegistryFacts(AzureRMModuleBase):
admin_user_enabled = d['admin_user_enabled'] admin_user_enabled = d['admin_user_enabled']
if self.retrieve_credentials and 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 = { d = {
'resource_group': resource_group, 'resource_group': resource_group,