Ansible's autoscaling group for EC2

69 views
Skip to first unread message

biswajit...@commonfloor.com

unread,
Jan 12, 2015, 8:27:25 AM1/12/15
to ansible...@googlegroups.com
Hi All,

I am getting below error while running my playbook for autoscaling group.

the snippet for autoscaling group is...

____________
- name: create autoscale groups
  ec2_asg:
    name: "{{ asg_group_name }}"
    health_check_period: 420 
    load_balancers: "{{ load_balancers }}"
    health_check_type: ELB
    availability_zones: "{{ availability_zones | join(',')}}"
    launch_config_name: "{{ lc_name }}"
    min_size: "{{ asg_min_size }}"
    max_size: "{{ asg_max_size }}"
    desired_capacity: "{{ asg_desired_capacity }}"
    region: "{{ region }}"

    replace_all_instances: yes
    vpc_zone_identifier: "{{ asg_subnets | join(',') }}"

  delay: 10 
  retries: 120
  register: asg_result
  tags: autoscale_group

__________________________

Error is :

_________


TASK: [platform | launch load balancer] ****************************************** 
ok: [localhost]

TASK: [scaling | create launch config] ************************************ 
changed: [localhost]

TASK: [rolling_asg | create autoscale groups] ********************************* 
failed: [localhost] => {"failed": true, "parsed": false}
Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-tmp-1421068448.77-61261087588667/ec2_asg", line 2355, in <module>
    main()
  File "/root/.ansible/tmp/ansible-tmp-1421068448.77-61261087588667/ec2_asg", line 2345, in main
    create_changed, asg_properties=create_autoscaling_group(connection, module)
  File "/root/.ansible/tmp/ansible-tmp-1421068448.77-61261087588667/ec2_asg", line 2072, in create_autoscaling_group
    asg_properties = get_properties(ag)
  File "/root/.ansible/tmp/ansible-tmp-1421068448.77-61261087588667/ec2_asg", line 2008, in get_properties
    properties['tags'] = dict((t.key, t.value) for t in autoscaling_group.tags)
TypeError: 'NoneType' object is not iterable

___________________________________________

Ansible version :1.9


Any help or pointer will be much welcome and badly in need of that. 


Regards,
Biswajit



Using a smartphone? Try our app for property search and app for residential communities.
------------------------------------------------------------------------------------------------------------------
This e-mail and any files transmitted with it may contain confidential and privileged information are for the sole use of the intended recipient(s) . If you are not the intended recipient, please appraise the sender by reply e-mail and destroy all copies and the original message. Any unauthorized disclosure, dissemination, forwarding, printing or copying of this email or any action taken on this e-mail is strictly prohibited and may be unlawful.
Reply all
Reply to author
Forward
0 new messages