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.

Revisions

  1. davidclin created this gist Sep 29, 2017.
    36 changes: 36 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    ==========================
    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)]