FreeKB - Ansible pip module
Ansible - pip module

If you are not familiar with modules, check out Ansible - Getting Started with Modules.

The pip module can be used to use pip to do something, such as installing a Python package.

pip will need to be installed on your managed nodes. The yum module can be used to install pip on your managed nodes.

In this example, pip will be used to install the latest version of pymysql.

- name: pip install the latest version of pymysql
   pip:
     name: pymysql
     state: latest

 

Or to install a specific version of pymysql.

- name: pip install pymysql version 0.10.1
   pip:
     name: pymysql=0.10.1

 

To install two (or more) packages.

- name: pip install the latest versions of pymysql and django
   pip:
     name:
       - pymysql
       - django
     state: latest

 

To uninstall pymysql.

- name: pip uninstall pymysql
   pip:
     name: pymysql
     state: absent

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 9658a in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |