Closed sieberst closed 4 weeks ago
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
cc @russoz click here for bot help
Generic module options like pipx_args
are generally a Very Bad Idea. Having a specific module option for some unsupported parameter is a far better choice.
I'm also fine with a specific parameter like "suffix":
community.general.pipx:
name: conan
suffix: "2"
Hi @sieberst Thanks for raising this issue! :-) Adding parameters should be very straightforward. This --suffix
parameter has been marked as experimental since ever, so I did not bother to implement it before. Now that someone is asking for it seems like a good time to do it. The PR should be coming out along this week (hopefully).
As a matter of fact, the pipx integration tests are currently disabled in the CI - long story - and running locally here I see that something got broken during this time. I should be fixing that first, then adding this feature.
@felixfontein @russoz The PR doesn't solve this ticket, which is the lack of pipx_args
.
In pipx v1.6.0 support for --global
was added to all the cmds, this creates a venvs for all users. There's other options completly un-accesible via ansible.
Is the plan to add each single option in pipx to ansible? There's already a pip_args
, why not just add pipx_args
and let the user make that decision.
The PR doesn't solve this ticket, which is the lack of
pipx_args
.
In that case this ticket has to be closed since that won't get implemented anyway. Options such as pipx_args
are dangerous and prevent correct implementation of most other features.
As I already commented in the past, I'm fine with the solution of the PR, the reason I asked for a more generic pipx_args
solution was that I thought it would be more useful to have a generic solution and I didn't expect it to be a problem given the existing pip_args
parameter.
@felixfontein @russoz The PR doesn't solve this ticket, which is the lack of
pipx_args
.In pipx v1.6.0 support for
--global
was added to all the cmds, this creates a venvs for all users. There's other options completly un-accesible via ansible.Is the plan to add each single option in pipx to ansible? There's already a
pip_args
, why not just addpipx_args
and let the user make that decision.
As Felix explained, yes, that would be the right way to go. I am happy to implement --global
or any other parameter you'd like, it is not a complicated feat. I just have not had the time to keep track of all changes in commands. Could you please help point them out - in a new issue? That would be much appreciated.
@russoz Sounds reasonable, I will create a separate issue for --global
. Newer Ubuntu distributions fail if you try to install global pip packages and this pipx flag fixes that. Thanks!
Issue has been created https://github.com/ansible-collections/community.general/issues/8705
Summary
I want to install two different versions of conan (conan 1.x and conan 2.x) in parallel via pipx by renaming the binary of the conan 2 installation as "conan2". This can be done with the pipx parameter "--suffix 2", but there is currently no way to supply such pipx parameters in the Ansible task. So we need 'pipx_args' similar to the existing 'pip_args'.
Issue Type
Feature Idea
Component Name
pipx
Additional Information
Code of Conduct