Fixing azure_rm_containerregistry_facts (#45897)
* fixing cr facts * final fix? * fixed * syntax * sanity
This commit is contained in:
parent
5a3000af19
commit
60979a96a9
1 changed files with 8 additions and 1 deletions
|
@ -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…
Reference in a new issue