Skip to content

Instantly share code, notes, and snippets.

@dpalomar
Last active October 15, 2021 09:05
Show Gist options
  • Save dpalomar/96b826dac5c2e8b62cbf4c86dbd1c9df to your computer and use it in GitHub Desktop.
Save dpalomar/96b826dac5c2e8b62cbf4c86dbd1c9df to your computer and use it in GitHub Desktop.
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
Copy link

Thanks.. this was very helpful.

@Foxtrod89
Copy link

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

@ZeroDeth
Copy link

ZeroDeth commented Feb 9, 2018

Thank You!

@DevJulianSalas
Copy link

Thank you!

@dvdknaap
Copy link

dvdknaap commented May 8, 2018

Thanks !!!

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