Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipx does not pass --global on upgrade #9103

Open
1 task done
martin-dziura-ot opened this issue Nov 6, 2024 · 3 comments
Open
1 task done

pipx does not pass --global on upgrade #9103

martin-dziura-ot opened this issue Nov 6, 2024 · 3 comments
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type)

Comments

@martin-dziura-ot
Copy link

Summary

pipx role does not install packages globally when requesting state: latest, but it does with state: present

Issue Type

Bug Report

Component Name

pipx

Ansible Version

ansible [core 2.17.6]
  config file = /workspace/ansible.cfg
  configured module search path = ['/home/vscode/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vscode/.local/lib/python3.12/site-packages/ansible
  ansible collection location = /home/vscode/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/vscode/.local/bin/ansible
  python version = 3.12.3 (main, Apr 24 2024, 11:17:35) [GCC 12.2.0] (/usr/local/bin/python)
  jinja version = 3.1.4
  libyaml = True

Community.general Version

# /home/vscode/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 10.0.0 

# /home/vscode/.local/lib/python3.12/site-packages/ansible_collections
Collection        Version
----------------- -------
community.general 9.5.1 

Configuration

$ ansible-config dump --only-changed

OS / Environment

devontainer mcr.microsoft.com/vscode/devcontainers/python

Steps to Reproduce

- community.general.pipx:
    name: hello-world
    global: true
    state: latest

Expected Results

"cmd": ["/bin/python3", "-m", "pipx", "upgrade", "--global", "hello-world"]

Actual Results

"cmd": ["/bin/python3", "-m", "pipx", "upgrade", "hello-world"]

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

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.

click here for bot help

@ansibullbot
Copy link
Collaborator

cc @russoz
click here for bot help

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) labels Nov 6, 2024
@russoz
Copy link
Collaborator

russoz commented Nov 22, 2024

Hi @martin-dziura-ot thanks for your report.

From your description, I reckon you are probably using the community.general 9.5.1 instead of the 10.0.0. I created a PR (9170, mentioned above) that proves that the command line is being generated as it should, at least in the latest code.

Could you please ensure you are using the 10.0.0 version in your test? I believe it will produce the expected outcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

3 participants