Hi,
I have an autoscaling group which normally has a desired capacity of 0. It is used only for database restorals. When we want to do a restore, we set the "DesiredCapacity" to 1. This causes a larger, more powerful, image to start. Once the restore completes, we set the DesiredCapacity back to 0 and the image is taken down. Setting this via the aws cli works fine and has for some time.
So far, I can't get the desired capacity to change the ansible "ec2_scaling_policy" module. Here is one definition I tried
- name: Prep for autoscaling
hosts: localhost
sudo: no
tasks:
- name: Set autoscaling policy
register: adjust
ec2_scaling_policy:
region: us-east-1
asg_name: "{{rethinkdb_restoral_group}}"
name: "upscale"
state: present
adjustment_type: "DesiredCapacity"
scaling_adjustment: 1
min_adjustment_step: 1
- name: Show status
debug: var=adjust
Output of debug statement above:
TASK [Show status] *************************************************************
ok: [localhost] => {
"adjust": {
"adjustment_type": "ChangeInCapacity",
"arn": "<yadda-yadda>",
"changed": false,
"cooldown": null,
"min_adjustment_step": 1,
"name": "upscale",
"scaling_adjustment": 1
}
}
The capacity did not change, and the new image did not come up. What am I missing?
Thanks,
-T