Last active
November 25, 2020 15:45
-
-
Save giner/2bec2d84511d74ceb20ee9a4adbb9c4c to your computer and use it in GitHub Desktop.
Install ansible to a dedicated directory with all dependencies
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
ansible_version="2.9.*" | |
sudo apt-add-repository universe | |
sudo apt install -y python3-pip python3-venv | |
[[ -d "$HOME/bin" ]] || { mkdir "$HOME/bin"; source $HOME/.profile; } | |
python3 -m venv ~/ansible | |
~/ansible/bin/pip3 install wheel | |
~/ansible/bin/pip3 install ansible=="$ansible_version" | |
for file in ~/ansible/bin/ansible*; do | |
ln -sfd "$file" ~/bin/ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment