pip_package_info – pip package information¶
New in version 2.8.
Requirements¶
The below requirements are needed on the host that executes this module.
- The requested pip executables must be installed on the target.
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
clients
list
|
Default: ["pip"]
|
A list of the pip executables that will be used to get the packages. They can be supplied with the full path or just the executable name, i.e `pip3.7`.
|
Examples¶
- name: Just get the list from default pip
pip_package_info:
- name: get the facts for default pip, pip2 and pip3.6
pip_package_info:
clients: ['pip', 'pip2', 'pip3.6']
- name: get from specific paths (virtualenvs?)
pip_package_info:
clients: '/home/me/projec42/python/pip3.5'
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | |
---|---|---|---|
packages
dictionary
|
always |
a dictionary of installed package data
|
|
python
dictionary
|
always |
A dictionary with each pip client which then contains a list of dicts with python package information
Sample:
{'packages': {'pip': {'Babel': [{'name': 'Babel', 'source': 'pip', 'version': '2.6.0'}], 'Flask': [{'name': 'Flask', 'source': 'pip', 'version': '1.0.2'}], 'Flask-SQLAlchemy': [{'name': 'Flask-SQLAlchemy', 'source': 'pip', 'version': '2.3.2'}], 'Jinja2': [{'name': 'Jinja2', 'source': 'pip', 'version': '2.10'}]}}}
|
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- Matthew Jones (@matburt)
- Brian Coca (@bcoca)
- Adam Miller (@maxamillion)
Hint
If you notice any issues in this documentation you can edit this document to improve it.