Create a gist now

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.

Show comment
Hide comment
@anandarajm

anandarajm Jul 19, 2017

Thanks.. this was very helpful.

Thanks.. this was very helpful.

@Foxtrod89

This comment has been minimized.

Show comment
Hide comment
@Foxtrod89

Foxtrod89 Jan 23, 2018

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

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

@ZeroDeth

This comment has been minimized.

Show comment
Hide comment
@ZeroDeth

ZeroDeth Feb 9, 2018

Thank You!

ZeroDeth commented Feb 9, 2018

Thank You!

@DevJulianSalas

This comment has been minimized.

Show comment
Hide comment

Thank you!

@dvdknaap

This comment has been minimized.

Show comment
Hide comment
@dvdknaap

dvdknaap May 8, 2018

Thanks !!!

dvdknaap commented May 8, 2018

Thanks !!!

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