ANSIBLE.PIP(3)

NAME
pip - Manages Python library dependencies.

DESCRIPTION

Manage Python library dependencies.

OPTIONS

extra_args
    Extra arguments passed to pip.(Added in Ansible version 1.0.)

name
    The name of a Python library to install

requirements
    The path to a pip requirements file

state
    The state of module Choices: present,absent,latest. (default: present)

use_mirrors
    Whether to use mirrors when installing python libraries. If using an older version of pip (< 1.0), you should set this to no because older versions of pip do not support --use-mirrors. Choices: yes,no. (default: yes)(Added in Ansible version 1.0.)

version
    The version number to install of the Python library specified in the name parameter

virtualenv
    An optional path to a virtualenv directory to install into

virtualenv_command
    The command to create the virtual environment with. For example pyvenv, virtualenv, virtualenv2. (default: virtualenv)

virtualenv_site_packages
    Whether the virtual environment will inherit packages from the global site-packages directory. Note that if this setting is changed on an already existing virtual environment it will not have any effect, the environment must be deleted and newly created. Choices: yes,no. (default: no)(Added in Ansible version 1.0.)

NOTES

Please note that virtualenv (http://www.virtualenv.org/) must be installed on the remote host if the virtualenv parameter is specified.

EXAMPLES

Install flask python package.
pip: name=flask

Install flask python package on version 0.8.
pip: name=flask version=0.8

Install Flask (http://flask.pocoo.org/) into the specified virtualenv, inheriting none of the globally installed modules
pip: name=flask virtualenv=/my_app/venv

Install Flask (http://flask.pocoo.org/) into the specified virtualenv, inheriting globally installed modules
pip: name=flask virtualenv=/my_app/venv virtualenv_site_packages=yes

Install Flask (http://flask.pocoo.org/) into the specified virtualenv, using Python 2.7
pip: name=flask virtualenv=/my_app/venv virtualenv_command=virtualenv-2.7

Install specified python requirements.
pip: requirements=/my_app/requirements.txt

Install specified python requirements in indicated virtualenv.
pip: requirements=/my_app/requirements.txt virtualenv=/my_app/venv

Install specified python requirements and custom Index URL.
pip: requirements=/my_app/requirements.txt extra_args='-i https://example.com/pypi/simple'
None

AUTHOR
Matt Wright

SEE ALSO
ansible(1), http://ansible.github.com/modules.html#pip