Change location of hosts file
-
create your own ansible.cfg
[defaults]
inventory = /path/to/hosts
Ping all hosts
ansible all -m ping --private-key private.pem -u ec2-user
EC2
wget https://raw.githubusercontent.com/ansible/ansible/devel/plugins/inventory/ec2.py wget https://raw.githubusercontent.com/ansible/ansible/devel/plugins/inventory/ec2.ini
-
create boto config with AWS keys
[Credentials] aws_access_key_id = aws_secret_access_key =