From 821c27cefb0e3ee1f9d9a3867da7127304cc2054 Mon Sep 17 00:00:00 2001 From: Zim Kalinowski Date: Wed, 12 Sep 2018 11:00:58 +0800 Subject: [PATCH] fixed tag support in autoscale facts (#45533) * fixed tag support in autoscale facts * forgot to add tags to arg spec --- .../modules/cloud/azure/azure_rm_autoscale_facts.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_autoscale_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_autoscale_facts.py index 81e354e18f..e3aaeb184b 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_autoscale_facts.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_autoscale_facts.py @@ -29,10 +29,12 @@ options: name: description: - The name of the Auto Scale Setting. + tags: + description: + - Limit results by providing a list of tags. Format tags as 'key' or 'key:value'. extends_documentation_fragment: - azure - - azure_tags author: - "Yuwei Zhou (@yuwzho)" @@ -51,7 +53,7 @@ EXAMPLES = ''' ''' RETURN = ''' -azure_autoscale: +autoscales: description: List of Azure Scale Settings dicts. returned: always type: list @@ -131,6 +133,9 @@ class AzureRMAutoScaleFacts(AzureRMModuleBase): ), name=dict( type='str' + ), + tags=dict( + type='list' ) ) # store the results of the module operation @@ -138,10 +143,10 @@ class AzureRMAutoScaleFacts(AzureRMModuleBase): self.resource_group = None self.name = None self.tags = None - super(AzureRMAutoScaleFacts, self).__init__(self.module_arg_spec) + super(AzureRMAutoScaleFacts, self).__init__(self.module_arg_spec, supports_tags=False) def exec_module(self, **kwargs): - for key in list(self.module_arg_spec) + ['tags']: + for key in list(self.module_arg_spec): setattr(self, key, kwargs[key]) if self.resource_group and self.name: