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:
parent
81214409cf
commit
821c27cefb
1 changed files with 9 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue