mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 06:30:19 -07:00
Prepare for version 11: pipx/pipx_info (#10137)
* Remove various deprecated module helper things. * pipx/pipx_info: pipx 1.7.0 required from c.g. 11.0.0 onwards * restore chglog frag * add changelog frag * fix chglog --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
13e3aed86d
commit
a249996f91
6 changed files with 61 additions and 63 deletions
|
@ -14,9 +14,6 @@ options:
|
|||
global:
|
||||
description:
|
||||
- The module will pass the C(--global) argument to C(pipx), to execute actions in global scope.
|
||||
- The C(--global) is only available in C(pipx>=1.6.0), so make sure to have a compatible version when using this option.
|
||||
Moreover, a nasty bug with C(--global) was fixed in C(pipx==1.7.0), so it is strongly recommended you used that version
|
||||
or newer.
|
||||
type: bool
|
||||
default: false
|
||||
executable:
|
||||
|
@ -25,10 +22,9 @@ options:
|
|||
- 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
|
||||
requirements:
|
||||
- This module requires C(pipx) version 1.7.0 or above. Please note that C(pipx) 1.7.0 requires Python 3.8 or above.
|
||||
notes:
|
||||
- This module requires C(pipx) version 0.16.2.1 or above. From community.general 11.0.0 onwards, the module will require
|
||||
C(pipx>=1.7.0).
|
||||
- Please note that C(pipx) requires Python 3.6 or above.
|
||||
- This module does not install the C(pipx) python package, however that can be easily done with the module M(ansible.builtin.pip).
|
||||
- This module does not require C(pipx) to be in the shell C(PATH), but it must be loadable by Python as a module.
|
||||
- This module will honor C(pipx) environment variables such as but not limited to E(PIPX_HOME) and E(PIPX_BIN_DIR) passed
|
||||
|
|
|
@ -211,6 +211,7 @@ version:
|
|||
from ansible_collections.community.general.plugins.module_utils.module_helper import StateModuleHelper
|
||||
from ansible_collections.community.general.plugins.module_utils.pipx import pipx_runner, pipx_common_argspec, make_process_dict
|
||||
from ansible_collections.community.general.plugins.module_utils.pkg_req import PackageRequirement
|
||||
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
|
||||
|
||||
from ansible.module_utils.facts.compat import ansible_facts
|
||||
|
||||
|
@ -293,6 +294,9 @@ class PipX(StateModuleHelper):
|
|||
rc, out, err = ctx.run()
|
||||
self.vars.version = out.strip()
|
||||
|
||||
if LooseVersion(self.vars.version) < LooseVersion("1.7.0"):
|
||||
self.do_raise("The pipx tool must be at least at version 1.7.0")
|
||||
|
||||
def __quit_module__(self):
|
||||
self.vars.application = self._retrieve_installed()
|
||||
|
||||
|
|
|
@ -127,6 +127,7 @@ version:
|
|||
|
||||
from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper
|
||||
from ansible_collections.community.general.plugins.module_utils.pipx import pipx_runner, pipx_common_argspec, make_process_dict
|
||||
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
|
||||
|
||||
from ansible.module_utils.facts.compat import ansible_facts
|
||||
|
||||
|
@ -156,6 +157,9 @@ class PipXInfo(ModuleHelper):
|
|||
rc, out, err = ctx.run()
|
||||
self.vars.version = out.strip()
|
||||
|
||||
if LooseVersion(self.vars.version) < LooseVersion("1.7.0"):
|
||||
self.do_raise("The pipx tool must be at least at version 1.7.0")
|
||||
|
||||
def __run__(self):
|
||||
output_process = make_process_dict(self.vars.include_injected, self.vars.include_deps)
|
||||
with self.runner('_list global', output_process=output_process) as ctx:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue