Skip to content

Instantly share code, notes, and snippets.

@davidclin
Created September 29, 2017 21:39
Show Gist options
  • Select an option

  • Save davidclin/cbb3a7af9bedf8f39c2961e898e6a707 to your computer and use it in GitHub Desktop.

Select an option

Save davidclin/cbb3a7af9bedf8f39c2961e898e6a707 to your computer and use it in GitHub Desktop.
Basic install of Ansible using EC2 Amazon Linux AMI (Free tier)
==========================
Last Validated: 09/29/2017
==========================
ssh to your ec2 amazon ec2 instance
# Update and install dependencies
sudo su
yum update
yum install -y git
sudo yum groupinstall "Development Tools"
cd /usr/local/src
yum -y install git python-jinja2 python-paramiko PyYAML make MySQL-python
# You also need libffi-devel and openssl-devel in order to perform the 'make install'
yum install -y libffi-devel openssl-devel
# Install Ansible
git clone git://github.com/ansible/ansible.git
cd ansible
git submodule update --init --recursive
make install
CTRL + D
# Test Ansible
$ansible --version
[Sample Output]
$ansible --version
ansible 2.5.0
config file = None
configured module search path = [u'/home/ec2-user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/site-packages/ansible-2.5.0-py2.7.egg/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.12 (default, Sep 1 2016, 22:14:00) [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment