Hello all,
I am trying to create an Auto-Scaling Group using ansible. This is
the playbook:
$ tail -n +1 auto.scaling.group.yml
- hosts: localhost
connection: local
gather_facts: False
tasks:
- name: create auto-scaling group
ec2_asg:
name: "MRA"
launch_config_name: "mail-relay - ansible"
region: "eu-west-1"
availability_zones: [ 'eu-west-1a', 'eu-west-1b', 'eu-west-1c' ]
vpc_zone_identifier: [ 'subnet-8cfaf2ab']
min_size: 0
max_size: 10
desired_capacity: 0
However, when I run it with this command:
$ ansible-playbook auto.scaling.group.yml -vvv
I get this error:
...
failed: [localhost] => {"failed": true}
msg: BotoServerError: 400 Bad Request
<ErrorResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/">
<Error>
<Type>Sender</Type>
<Code>ValidationError</Code>
<Message>The subnet ID '['subnet-8cfaf2ab']' does not exist</Message>
</Error>
<RequestId>90ee5366-a20d-11e4-b9e5-294dcdf4fd56</RequestId>
</ErrorResponse>
FATAL: all hosts have already failed -- aborting
...
That subnet does exist as I did a copy/paste straight from an ASG that
I created by hand.
I suspect my error may be elsewhere, but I am not seeing it. Any
thoughts on what I am doing wrong?
Regards,
- Robert