diff --git a/changelogs/fragments/3800-pipx-include-apps.yaml b/changelogs/fragments/3800-pipx-include-apps.yaml new file mode 100644 index 0000000000..49113ed450 --- /dev/null +++ b/changelogs/fragments/3800-pipx-include-apps.yaml @@ -0,0 +1,2 @@ +bugfixes: + - pipx - passes the correct command line option ``--include-apps`` (https://github.com/ansible-collections/community.general/issues/3791). diff --git a/plugins/modules/packaging/language/pipx.py b/plugins/modules/packaging/language/pipx.py index f771cf6025..64cebbceed 100644 --- a/plugins/modules/packaging/language/pipx.py +++ b/plugins/modules/packaging/language/pipx.py @@ -167,7 +167,7 @@ class PipX(CmdStateModuleHelper): command_args_formats = dict( state=dict(fmt=lambda v: [_state_map.get(v, v)]), name_source=dict(fmt=lambda n, s: [s] if s else [n], stars=1), - install_deps=dict(fmt="--install-deps", style=ArgFormat.BOOLEAN), + install_deps=dict(fmt="--include-deps", style=ArgFormat.BOOLEAN), inject_packages=dict(fmt=lambda v: v), force=dict(fmt="--force", style=ArgFormat.BOOLEAN), include_injected=dict(fmt="--include-injected", style=ArgFormat.BOOLEAN), diff --git a/tests/integration/targets/pipx/tasks/main.yml b/tests/integration/targets/pipx/tasks/main.yml index 67f65b9a48..ebf2b31076 100644 --- a/tests/integration/targets/pipx/tasks/main.yml +++ b/tests/integration/targets/pipx/tasks/main.yml @@ -124,3 +124,29 @@ - '"ansible-lint" in inject_pkgs_ansible_lint.application' - '"licenses" in inject_pkgs_ansible_lint.application["ansible-lint"]["injected"]' - uninstall_ansible_lint is changed + +############################################################################## +- name: install jupyter - not working smoothly in freebsd + block: + - name: ensure application jupyter is uninstalled + community.general.pipx: + name: jupyter + state: absent + + - name: install application jupyter + community.general.pipx: + name: jupyter + install_deps: true + register: install_jupyter + + - name: cleanup jupyter + community.general.pipx: + state: absent + name: jupyter + + - name: check assertions + assert: + that: + - install_jupyter is changed + - '"ipython" in install_jupyter.stdout' + when: ansible_system != 'FreeBSD'