ansible / ansible.builtin / v2.8.15 / module / pip_package_info pip package information | "added in version" 2.8 of ansible.builtin" Authors: Matthew Jones (@matburt), Brian Coca (@bcoca), Adam Miller (@maxamillion) preview | supported by communityansible.builtin.pip_package_info (v2.8.15) — module
pip
Install with pip install ansible==2.8.15
Return information about installed pip packages
- 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'
clients: default: - pip description: - 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`. required: false type: list
packages: contains: python: description: A dictionary with each pip client which then contains a list of dicts with python package information returned: always 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' type: dict description: a dictionary of installed package data returned: always type: dict