community / community.general / 6.6.8 / module / pipx Manages applications installed with pipx | "added in version" 3.8.0 of community.general" Authors: Alexei Znamensky (@russoz)community.general.pipx (6.6.8) — module
Install with ansible-galaxy collection install community.general:==6.6.8
collections: - name: community.general version: 6.6.8
Manage Python applications installed in isolated virtualenvs using pipx.
- name: Install tox community.general.pipx: name: tox
- name: Install tox from git repository community.general.pipx: name: tox source: git+https://github.com/tox-dev/tox.git
- name: Upgrade tox community.general.pipx: name: tox state: upgrade
- name: Reinstall black with specific Python version community.general.pipx: name: black state: reinstall python: 3.7
- name: Uninstall pycowsay community.general.pipx: name: pycowsay state: absent
name: description: - 'The name of the application to be installed. It must to be a simple package name. For passing package specifications or installing from URLs or directories, please use the I(source) option. ' type: str force: default: false description: - Force modification of the application's virtual environment. See C(pipx) for details. - Only used when I(state=install), I(state=upgrade), I(state=upgrade_all), I(state=latest), or I(state=inject). type: bool state: choices: - present - absent - install - uninstall - uninstall_all - inject - upgrade - upgrade_all - reinstall - reinstall_all - latest default: install description: - Desired state for the application. - The states C(present) and C(absent) are aliases to C(install) and C(uninstall), respectively. - The state C(latest) is equivalent to executing the task twice, with state C(install) and then C(upgrade). It was added in community.general 5.5.0. type: str python: description: - Python version to be used when creating the application virtual environment. Must be 3.6+. - Only used when I(state=install), I(state=latest), I(state=reinstall), or I(state=reinstall_all). type: str source: description: - 'If the application source, such as a package with version specifier, or an URL, directory or any other accepted specification. See C(pipx) documentation for more details. ' - When specified, the C(pipx) command will use I(source) instead of I(name). type: str editable: default: false description: - Install the project in editable mode. type: bool version_added: 4.6.0 version_added_collection: community.general pip_args: description: - Arbitrary arguments to pass directly to C(pip). type: str version_added: 4.6.0 version_added_collection: community.general index_url: description: - Base URL of Python Package Index. - Only used when I(state=install), I(state=upgrade), I(state=latest), or I(state=inject). type: str executable: description: - Path to the C(pipx) installed in the system. - 'If not specified, the module will use C(python -m pipx) to run the tool, using the same Python interpreter as ansible itself. ' type: path install_apps: default: false description: - Add apps from the injected packages. - Only used when I(state=inject). type: bool version_added: 6.5.0 version_added_collection: community.general install_deps: default: false description: - Include applications of dependent packages. - Only used when I(state=install), I(state=latest), or I(state=inject). type: bool inject_packages: description: - Packages to be injected into an existing virtual environment. - Only used when I(state=inject). elements: str type: list include_injected: default: false description: - Upgrade the injected packages along with the application. - Only used when I(state=upgrade), I(state=upgrade_all), or I(state=latest). - This is used with I(state=upgrade) and I(state=latest) since community.general 6.6.0. type: bool system_site_packages: default: false description: - Give application virtual environment access to the system site-packages directory. - Only used when I(state=install) or I(state=latest). type: bool version_added: 6.6.0 version_added_collection: community.general