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

fixed tag support in autoscale facts (#45533)

* fixed tag support in autoscale facts

* forgot to add tags to arg spec
This commit is contained in:
Zim Kalinowski 2018-09-12 11:00:58 +08:00 committed by ansibot
parent 81214409cf
commit 821c27cefb

View file

@ -29,10 +29,12 @@ options:
name: name:
description: description:
- The name of the Auto Scale Setting. - 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: extends_documentation_fragment:
- azure - azure
- azure_tags
author: author:
- "Yuwei Zhou (@yuwzho)" - "Yuwei Zhou (@yuwzho)"
@ -51,7 +53,7 @@ EXAMPLES = '''
''' '''
RETURN = ''' RETURN = '''
azure_autoscale: autoscales:
description: List of Azure Scale Settings dicts. description: List of Azure Scale Settings dicts.
returned: always returned: always
type: list type: list
@ -131,6 +133,9 @@ class AzureRMAutoScaleFacts(AzureRMModuleBase):
), ),
name=dict( name=dict(
type='str' type='str'
),
tags=dict(
type='list'
) )
) )
# store the results of the module operation # store the results of the module operation
@ -138,10 +143,10 @@ class AzureRMAutoScaleFacts(AzureRMModuleBase):
self.resource_group = None self.resource_group = None
self.name = None self.name = None
self.tags = 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): 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]) setattr(self, key, kwargs[key])
if self.resource_group and self.name: if self.resource_group and self.name: