mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
pipx: document parameters supported with state=latest, and fix include_injected parameter (#6212)
* pipx: Document parameters supported with state=latest * pipx: Support "include_injected" with states "upgrade" and "latest" - Contrary to documentation, "include_injected" doesn't appear to have worked with state=upgrade since it was introduced. - Add support for include_injected with "latest", since "latest" is specified as being install+upgrade. * Add changelog fragment * Update plugins/modules/pipx.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update changelog fragment Co-authored-by: Felix Fontein <felix@fontein.de> * pipx: Update to correct target release of community.general --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
f3ea3e0da5
commit
33093e9f3e
2 changed files with 10 additions and 7 deletions
2
changelogs/fragments/6212-pipx-include-injected.yml
Normal file
2
changelogs/fragments/6212-pipx-include-injected.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- pipx - ensure ``include_injected`` parameter works with ``state=upgrade`` and ``state=latest`` (https://github.com/ansible-collections/community.general/pull/6212).
|
|
@ -57,7 +57,7 @@ options:
|
||||||
install_deps:
|
install_deps:
|
||||||
description:
|
description:
|
||||||
- Include applications of dependent packages.
|
- Include applications of dependent packages.
|
||||||
- Only used when I(state=install), I(state=upgrade), or I(state=inject).
|
- Only used when I(state=install), I(state=latest), I(state=upgrade), or I(state=inject).
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
inject_packages:
|
inject_packages:
|
||||||
|
@ -69,24 +69,25 @@ options:
|
||||||
force:
|
force:
|
||||||
description:
|
description:
|
||||||
- Force modification of the application's virtual environment. See C(pipx) for details.
|
- 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), or I(state=inject).
|
- Only used when I(state=install), I(state=upgrade), I(state=upgrade_all), I(state=latest), or I(state=inject).
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
include_injected:
|
include_injected:
|
||||||
description:
|
description:
|
||||||
- Upgrade the injected packages along with the application.
|
- Upgrade the injected packages along with the application.
|
||||||
- Only used when I(state=upgrade) or I(state=upgrade_all).
|
- 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
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
index_url:
|
index_url:
|
||||||
description:
|
description:
|
||||||
- Base URL of Python Package Index.
|
- Base URL of Python Package Index.
|
||||||
- Only used when I(state=install), I(state=upgrade), or I(state=inject).
|
- Only used when I(state=install), I(state=upgrade), I(state=latest), or I(state=inject).
|
||||||
type: str
|
type: str
|
||||||
python:
|
python:
|
||||||
description:
|
description:
|
||||||
- Python version to be used when creating the application virtual environment. Must be 3.6+.
|
- Python version to be used when creating the application virtual environment. Must be 3.6+.
|
||||||
- Only used when I(state=install), I(state=reinstall), or I(state=reinstall_all).
|
- Only used when I(state=install), I(state=latest), I(state=reinstall), or I(state=reinstall_all).
|
||||||
type: str
|
type: str
|
||||||
executable:
|
executable:
|
||||||
description:
|
description:
|
||||||
|
@ -254,7 +255,7 @@ class PipX(StateModuleHelper):
|
||||||
if self.vars.force:
|
if self.vars.force:
|
||||||
self.changed = True
|
self.changed = True
|
||||||
|
|
||||||
with self.runner('state index_url install_deps force editable pip_args name', check_mode_skip=True) as ctx:
|
with self.runner('state include_injected index_url install_deps force editable pip_args name', check_mode_skip=True) as ctx:
|
||||||
ctx.run()
|
ctx.run()
|
||||||
self._capture_results(ctx)
|
self._capture_results(ctx)
|
||||||
|
|
||||||
|
@ -307,7 +308,7 @@ class PipX(StateModuleHelper):
|
||||||
ctx.run(state='install', name_source=[self.vars.name, self.vars.source])
|
ctx.run(state='install', name_source=[self.vars.name, self.vars.source])
|
||||||
self._capture_results(ctx)
|
self._capture_results(ctx)
|
||||||
|
|
||||||
with self.runner('state index_url install_deps force editable pip_args name', check_mode_skip=True) as ctx:
|
with self.runner('state include_injected index_url install_deps force editable pip_args name', check_mode_skip=True) as ctx:
|
||||||
ctx.run(state='upgrade')
|
ctx.run(state='upgrade')
|
||||||
self._capture_results(ctx)
|
self._capture_results(ctx)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue