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

Serialize tag attributes to ASG properties in ec2_asg

Fixes #108
This commit is contained in:
James Cammarata 2014-11-12 11:04:43 -06:00 committed by Matt Clay
parent f59a1348ad
commit e9fbb5f1b6

View file

@ -245,6 +245,10 @@ def get_properties(autoscaling_group):
properties['pending_instances'] += 1
properties['instance_facts'] = instance_facts
properties['load_balancers'] = autoscaling_group.load_balancers
if hasattr(autoscaling_group, "tags"):
properties['tags'] = dict((t.key, t.value) for t in autoscaling_group.tags)
return properties
@ -357,6 +361,7 @@ def create_autoscaling_group(connection, module):
continue
if changed:
connection.create_or_update_tags(asg_tags)
as_group.tags = asg_tags
# handle loadbalancers separately because None != []
load_balancers = module.params.get('load_balancers') or []