Hi, everyone:
   My base environment are below:

   - ubuntu 14.04 64bit 
   - ansible 1.9.4 
   - python 2.7.9 64bit 

​

    I am green hand to ansible.I study ansible documentation for ec2 module 
http://docs.ansible.com/ansible/ec2_module.html . I want to create at least 
100 ec2 instances on AWS. So I wrate a test yml file just for a test,the 
content is bellow:

---
  - name: deploy basic env
    hosts: 127.0.0.1
    connection: local
    gather_facts: False

    tasks:
      - name: Provision a set of instances
        ec2:
          aws_access_key: "xxx"
          aws_secret_key: "xxx"
          instance_type: t2.micro
          image: ami-52d1183f
          group: test
          count_tag:
            Name: testenv
          count: 3
          wait: yes
          vpc_subnet_id: subnet-2649d843
          assign_public_ip: yes
          region: cn-north-1
        register: ec2_test

      - name: Add all instance public IPs to host group
        add_host: hostname={{ item.public_ip }} groups=ec2hosts
        with_items: ec2_test.instances

​
I add 

[localhost]
127.0.0.1

​
to 
 /etc/ansible/hosts
​  

When I run

adolph@geek:dcos_absible_prac$ ansible-playbook prac.yml 

PLAY [deploy basic env] ******************************************************* 

TASK: [Provision a set of instances] ****************************************** 
failed: [127.0.0.1] => {"failed": true}
msg: Region cn-north-1 does not seem to be available for aws module boto.ec2. 
If the region definitely exists, you may need to upgrade boto

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/home/adolph/prac.retry

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

​
I am in China and 
cn-noarth-1
is supported by boto. So I don't know what is the problem.Can you help me ?
​ isis supported by boto





-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/dd93feb4-c125-4f5c-8086-1c6a89061a89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to