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

Show access keys for azure_rm_storageaccount (#56612)

This commit is contained in:
MyronFanQiu 2019-05-23 10:26:51 +08:00 committed by Yunge Zhu
parent 54aa6f3921
commit 2a9b9d63ba

View file

@ -40,6 +40,7 @@ options:
show_connection_string:
description:
- Show the connection string for each of the storageaccount's endpoints.
- For convenient usage, C(show_connection_string) will also show the access keys for each of the storageaccount's endpoints.
- Note that it will cost a lot of time when list all storageaccount rather than query a single one.
type: bool
version_added: "2.8"
@ -218,6 +219,10 @@ storageaccounts:
description:
- Connectionstring of the table endpoint
sample: "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=X;AccountKey=X;TableEndpoint=X"
key:
description:
- The account key for the primary_endpoints
sample: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
secondary_endpoints:
description:
- Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the secondary location.
@ -263,6 +268,10 @@ storageaccounts:
description:
- Connectionstring of the table endpoint
sample: "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=X;AccountKey=X;TableEndpoint=X"
key:
description:
- The account key for the secondary_endpoints
sample: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
tags:
description:
- Resource tags.
@ -409,6 +418,8 @@ class AzureRMStorageAccountFacts(AzureRMModuleBase):
queue=self.format_endpoint_dict(account_dict['name'], account_key[0], account_obj.primary_endpoints.queue, 'queue'),
table=self.format_endpoint_dict(account_dict['name'], account_key[0], account_obj.primary_endpoints.table, 'table')
)
if account_key[0]:
account_dict['primary_endpoints']['key'] = '{0}'.format(account_key[0])
account_dict['secondary_endpoints'] = None
if account_obj.secondary_endpoints:
account_dict['secondary_endpoints'] = dict(
@ -416,6 +427,8 @@ class AzureRMStorageAccountFacts(AzureRMModuleBase):
queue=self.format_endpoint_dict(account_dict['name'], account_key[1], account_obj.primary_endpoints.queue, 'queue'),
table=self.format_endpoint_dict(account_dict['name'], account_key[1], account_obj.primary_endpoints.table, 'table'),
)
if account_key[1]:
account_dict['secondary_endpoints']['key'] = '{0}'.format(account_key[1])
account_dict['tags'] = None
if account_obj.tags:
account_dict['tags'] = account_obj.tags