Install ansible on Amazon EC2

Amazon Linux variety

# enable root ssh login as per http://tinyurl.com/d46d3o8
# as root
cd /usr/local/src
yum -y install git python-jinja2 python-paramiko PyYAML make MySQL-python
git clone git://github.com/ansible/ansible.git
cd ansible && make install

As per http://ansible.cc/docs/gettingstarted.html add your EC2 instance to /etc/ansible/hosts on your local (master) ansible install. You may also want to add your ansible key file to ssh-agent


# if you haven't enable root ssh login, use -u ec2-user
ansible all -u root -m ping

Leave a Reply

Your email address will not be published. Required fields are marked *