I am using Ansible's Dynamic Inventory feature to connect to the ec2 instances in AWS account using below:
AWS_PROFILE=personal ansible-playbook cifarm.yml -C I have copied the https://raw.github.com/ansible/ansible/devel/contrib/inventory/ec2.py into and https://raw.github.com/ansible/ansible/devel/contrib/inventory/ec2.ini file under inventory directory. On running AWS_PROFILE=personal ansible-playbook cifarm.yml -C, it throws below error: *Output*: *ERROR: Inventory script (inventory/ec2.py) had an execution error: ERROR: "Authentication error retrieving ec2 inventory. - AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment vars found but may not be correct - Boto configs found at '~/.boto, ~/.aws/credentials', but the credentials contained may not be correct", while: getting EC2 instances* I am running the playbook from a MAC OS. Please note that I am able to run below successfully: *aws ec2 describe-instances --page-size 5 --profile personal* This proves that the credentials are correct and also I have exported the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. I tried to execute the inventory/ec2.py file as below: ./ec2.py --list And it comes back with the same error. I saw a post where it was suggested to update the time on the machine, I am running the playbook. So I ran ntpdate -u <Network Time Server> But the issue still persists. I have no idea what is the reason. Any help/suggestions is much appreciated. -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/cd02d9da-b283-40f4-9351-80efa2386b23%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
