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:
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: