lundi 20 avril 2015

Ansible EC2 Hosts Script Missing Instance

For some reason, ansible's ec2 hosts is missing instances. ec2-describe-instances returns the correct instances, but /etc/ansible/hosts does not:

[root@or-manage ec2-user]# ec2-describe-instances | grep seed
TAG     instance        i-ff0b2f36      Name    cass-uat-seed
[root@or-manage ec2-user]# /etc/ansible/hosts | grep seed
[root@or-manage ec2-user]#

You can see that ec2-describe-instances has the instance with the tag I'm looking for, but ansible hosts does not.

Here's it being set for AWS in .bashrc:

export EC2_URL=http://ift.tt/1GjZLSL

And set in .boto

[Boto]
#ec2_version = 2012-10-17
ec2_region_name = us-west-2
ec2_region_endpoint = ec2.us-west-2.amazonaws.com
debug = 2

in ~/.aws/config for good measure:

[default]
region = us-west-2

/etc/boto.cfg does not exist.

why is that instance not in there for /etc/ansible/hosts?


Note: At first, I thought it was /etc/ansible/hosts using the wrong region, but I turned up the boto debug and it IS the correct region: send: 'POST / HTTP/1.1\r\nAccept-Encoding: identity\r\nContent-Length: 221\r\nContent-Type: application/x-www-form-urlencoded; charset=UTF-8\r\nHost: ec2.us-west-2.amazonaws.com




Aucun commentaire:

Enregistrer un commentaire