Starting EC2 Instance in 'us-west-2a' Region Gives Unexpected Error

58 views
Skip to first unread message

David Lloyd

unread,
Aug 29, 2014, 11:08:02 PM8/29/14
to ansible...@googlegroups.com

I have:

- hosts: localhost

  gather_facts: false

  connection: local

  vars:

    instance_ids:

      - 'i-62f8a46f'

    region: 'us-west-2a'

  tasks:

    - name: Start the instance(s).

      local_action:

        module: ec2

        instance_ids: '{{ instance_ids }}'

        region: '{{ region }}'

        state: running

        wait: True


This is fairly much a copy past of one of the examples.

However, Ansible's ec2 module complains like this:

% ansible-playbook ./playbook.pp


PLAY [localhost] ************************************************************** 


TASK: [Start the instance(s).] ************************************************ 

failed: [localhost] => {"failed": true}

msg: value of region must be one of: ap-northeast-1,ap-southeast-1,ap-southeast-2,eu-west-1,sa-east-1,us-east-1,us-west-1,us-west-2, got: us-west-2a


FATAL: all hosts have already failed -- aborting


PLAY RECAP ******************************************************************** 

           to retry, use: --limit @/Users/lloy0076/playbook.pp.retry


localhost                  : ok=0    changed=0    unreachable=0    failed=1   


Unfortunately this region does now exist; I added an 'ec2_url' rather than the 'region' but how would I go about finding out if someone's asked for the module to be updated to reflect this new region?

DSL

Can Shen

unread,
Aug 30, 2014, 12:21:27 PM8/30/14
to ansible...@googlegroups.com
region: 'us-west-2a' 

aws  region  not  has  this  region ,  us-west-2a is  zone name  not region , the region name is us-west-2

在 2014年8月30日星期六UTC+8上午11时08分02秒,David Lloyd写道:

James Cammarata

unread,
Aug 30, 2014, 11:49:12 PM8/30/14
to ansible...@googlegroups.com
The ec2 modules only accept the top level region, not the sub-regions. Just specify us-west-2 instead.


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/50d0932f-a4b3-41b4-aff1-04a4c486d5ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages