Last active
May 10, 2023 03:27
-
-
Save tdeckers-cisco/5813672 to your computer and use it in GitHub Desktop.
Install Ansible on RHEL6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Invoke this bootstrap using: | |
# bash < <(curl -s -L https://raw.github.com/gist/5813672/bootstrap-ansible.sh) | |
# (this should be run as root) | |
# | |
# move to working dir. | |
cd /tmp | |
echo "Installing EPEL" | |
if [ ! -e /usr/local/src/epel-release-6-8.noarch.rpm ]; then | |
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
mv -n epel-release-6-8.noarch.rpm //usr/local/src | |
rpm -ivh /usr/local/src/epel-release-6-8.noarch.rpm | |
if [ $? -ne 0 ]; then | |
echo Fail! | |
exit -1 | |
fi | |
yum update --skip-broken | |
fi | |
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 http://ansibleworks.com/releases/ansible-1.2.tar.gz | |
tar -zxvf ansible-1.2.tar.gz | |
cd ansible-1.2 | |
make install | |
echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment