Hello,
I’m trying to use the ec2_asg module here : http://docs.ansible.com/ec2_asg_module.html
The goal is to kill all instances during the night and boot them the morning.
I tried :
- name: Shutdown PREPROD
hosts: localhost
remote_user: root
tasks:
- name: Shutdown instances
ec2_asg:
region: eu-west-1
name: MYASGNAME
min_size: 1
max_size: 5
desired_capacity: 2
Settings are ok, the playbook run an modify my ASG as I wish.
When I try to set desired_capacity at 0 or min_size at 0, my parameters are ignored and no action is done.
Any idea about why I can’t do this ? The delete function do the same thing before remove the ASG.
My version of ansible is 1.8.1, installed with “pip”.
Thanks