Instantly share code, notes, and snippets.

Embed
What would you like to do?
Steps to install Ansible on Debian/Ubuntu
# base requirements
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo apt-get install -y python-setuptools python-dev libffi-dev libssl-dev git sshpass tree
sudo easy_install pip
sudo -H pip install cryptography
# sudo -H pip install ansible==2.1.1.0 if you don't need virtualenv
# virtualenv
sudo -H pip uninstall virtualenv
sudo -H pip uninstall virtualenvwrapper
sudo -H pip install virtualenv
sudo -H pip install virtualenvwrapper --ignore-installed six
sudo -H pip install httplib2
mkdir ~/.virtualenvs
mkdir ~/ansible_virtualenvs
# profile path
echo "source "$(which virtualenvwrapper.sh) >> ~/.profile
echo "export WORKON_HOME=~/.virtualenvs" >> ~/.profile
source ~/.profile
# install and configuration virtualenvs profiles
cd ~/ansible_virtualenvs
mkdir 1.9.4
cd 1.9.4
mkvirtualenv ansible-1.9.4
pip install ansible==1.9.4
ansible --version
deactivate
cd ~/ansible_virtualenvs
mkdir 1.9.5
cd 1.9.5
mkvirtualenv ansible-1.9.5
pip install ansible==1.9.5
ansible --version
deactivate
cd ~/ansible_virtualenvs
mkdir 1.9.6
cd 1.9.6
mkvirtualenv ansible-1.9.6
pip install ansible==1.9.6
ansible --version
deactivate
cd ~/ansible_virtualenvs
mkdir 2.0.0.1
cd 2.0.0.1
mkvirtualenv ansible-2.0.0.1
pip install ansible==2.0.0.1
ansible --version
deactivate
cd ~/ansible_virtualenvs
mkdir 2.0.0.2
cd 2.0.0.2
mkvirtualenv ansible-2.0.0.2
pip install ansible==2.0.0.2
ansible --version
deactivate
cd ~/ansible_virtualenvs
mkdir 2.0.1.0
cd 2.0.1.0
mkvirtualenv ansible-2.0.1.0
pip install ansible==2.0.1.0
ansible --version
deactivate
cd ~/ansible_virtualenvs
mkdir 2.0.2.0
cd 2.0.2.0
mkvirtualenv ansible-2.0.2.0
pip install ansible==2.0.2.0
ansible --version
deactivate
cd ~/ansible_virtualenvs
mkdir 2.1.0.0
cd 2.1.0.0
mkvirtualenv ansible-2.1.0.0
pip install ansible==2.1.0.0
ansible --version
deactivate
cd ~/ansible_virtualenvs
mkdir 2.1.1.0
cd 2.1.1.0
mkvirtualenv ansible-2.1.1.0
pip install ansible==2.1.1.0
ansible --version
deactivate
# How works
# workon ansible-1.9.4
# ansible --version
@anandarajm

This comment has been minimized.

anandarajm commented Jul 19, 2017

Thanks.. this was very helpful.

@Foxtrod89

This comment has been minimized.

Foxtrod89 commented Jan 23, 2018

Streisand requires Ansible version 2.4.0 or higher.
This system has Ansible ansible 2.1.1.0....

@ZeroDeth

This comment has been minimized.

ZeroDeth commented Feb 9, 2018

Thank You!

@DevJulianSalas

This comment has been minimized.

DevJulianSalas commented Feb 15, 2018

Thank you!

@dvdknaap

This comment has been minimized.

dvdknaap commented May 8, 2018

Thanks !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment