Skip to content

Instantly share code, notes, and snippets.

@nev3rm0re
Created December 10, 2016 22:31
Show Gist options
  • Save nev3rm0re/1d5b05df9e5faf88711e67249102277b to your computer and use it in GitHub Desktop.
Save nev3rm0re/1d5b05df9e5faf88711e67249102277b to your computer and use it in GitHub Desktop.
This a quick cheat sheet to ansible's `pip` module, as I always forget the parameters
---
# Example of how to use Ansible's `pip` module
- name: For `virtualenv` install `python-virtualenv` module
apt: name=python-virtualenv state=installed
- name: Install requirements into `virtualenv`
pip:
requirements: requirements.txt
chdir: ./
virtualenv: ./venv
virtualenv_python: python3.5 # or python2.7, or nothing #since 2.0
virtualenv_site_packages: no # inherit global site-packages?
# extra_args: # extra args to pip executable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment