Skip to content

Instantly share code, notes, and snippets.

@4fthawaiian
Forked from tdeckers-cisco/bootstrap-ansible.sh
Last active September 5, 2016 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 4fthawaiian/bb659350196a2ed776d6cf8610eda651 to your computer and use it in GitHub Desktop.
Save 4fthawaiian/bb659350196a2ed776d6cf8610eda651 to your computer and use it in GitHub Desktop.
Install Ansible on RHEL6
#!/usr/bin/env bash
#
# Invoke this bootstrap using:
# bash < <(curl -s -L https://gist.githubusercontent.com/4fthawaiian/bb659350196a2ed776d6cf8610eda651/raw)
# (this should be run as root)
#
# symlink gsed (for compatibility with osx scripts)
cd /usr/local/bin; ln -s /bin/sed gsed
# another update
# move to working dir.
cd /tmp
echo "Installing Git"
yum install -y git
echo "Installing Ansible dependencies"
yum install -y PyYAML
echo "Installing Ansible dependencies - Jinja2"
yum install -y python-setuptools python-devel
wget --no-check-certificate https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.tar.gz
tar -zxvf Jinja2-2.7.tar.gz
cd Jinja2-2.7
python setup.py install
cd /tmp
echo "Installing Ansible dependencies - paramiko"
wget http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.6.tar.gz
tar -zxvf pycrypto-2.6.tar.gz
cd pycrypto-2.6
python setup.py build # not sure this is needed.
python setup.py install
cd /tmp
git clone git://github.com/paramiko/paramiko.git
cd paramiko
easy_install ./
cd /tmp
echo "Installing Ansible"
wget https://releases.ansible.com/ansible/ansible-2.1.0.0.tar.gz
tar -zxvf ansible-2.1.0.0.tar.gz
cd ansible-2.1.0.0
make install
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment