Easy install!
Last active
May 6, 2025 04:09
-
-
Save ishad0w/d85eb434be256b9fd90979b593e4630c to your computer and use it in GitHub Desktop.
Ansible with Mitogen (venv) for macOS / Linux
- Download the script
wget https://gist.githubusercontent.com/ishad0w/d85eb434be256b9fd90979b593e4630c/raw/ansible-with-mitogen-venv-install.sh
- Make it executable
chmod +x ansible-with-mitogen-venv-install.sh
- Run it
./ansible-with-mitogen-venv-install.sh
- Add the
PATH
to your.profile
or.zshrc
/.bashrc
export PATH="$HOME/.venvs/ansible-mitogen/abin:$PATH"
- Enjoy!
This file contains hidden or 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
#!/bin/bash | |
python3 -m venv ~/.venvs/ansible-mitogen | |
source ~/.venvs/ansible-mitogen/bin/activate | |
pip install --upgrade \ | |
pip cffi jmespath \ | |
boto3 pywinrm \ | |
mitogen==0.3.23 \ | |
ansible-core==2.18.5 \ | |
ansible==11.5.0 \ | |
ansible-lint==25.4.0 | |
mkdir -p ~/.venvs/ansible-mitogen/abin/ | |
ln -s ~/.venvs/ansible-mitogen/bin/ansible* ~/.venvs/ansible-mitogen/abin/ | |
mitogen_path=$(find $(python -c "import site; print(site.getsitepackages()[0])") -type d -name 'ansible_mitogen' | head -n 1)/plugins/strategy && echo $mitogen_path | |
cat <<EOL > ~/.ansible.cfg | |
[defaults] | |
strategy_plugins = $mitogen_path | |
strategy = mitogen_linear | |
EOL | |
export PATH="$HOME/.venvs/ansible-mitogen/abin:$PATH" | |
cat ~/.ansible.cfg | |
ansible --version | |
ansible-playbook --version | |
deactivate | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment