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

[BUG] Remove ansible installed using tdnf #400

Closed
surajssd opened this issue Apr 22, 2024 · 0 comments
Closed

[BUG] Remove ansible installed using tdnf #400

surajssd opened this issue Apr 22, 2024 · 0 comments
Labels
bug Something isn't working Triage-needed Triage needed by Cloud Shell team

Comments

@surajssd
Copy link
Member

Ansible is installed once with tdnf and once with pip3. Use only one version of ansible over other!

The ansible installed using tdnf is not picked up anyways because it is installed in /usr/bin/ansible and the one using pip3 it is installed in /usr/local/bin/ansible.

And if we look at the $PATH variable it seems that /usr/local/bin is before /usr/bin so the ansible installed using pip3 is picked up.

root [ / ]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

When installing ansible using pip3 only:

root [ / ]# find ./ -name ansible -type f
./usr/local/bin/ansible
./opt/ansible/bin/ansible
root [ / ]# ./usr/local/bin/ansible --version
ansible [core 2.15.11]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/ansible/lib/python3.9/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/ansible/bin/ansible
  python version = 3.9.19 (main, Mar 28 2024, 18:56:59) [GCC 11.2.0] (/opt/ansible/bin/python)
  jinja version = 3.1.3
  libyaml = True

When installing ansible using tdnf and pip3 (the default):

root [ / ]# find ./ -name ansible -type f
./usr/bin/ansible
./usr/local/bin/ansible
./opt/ansible/bin/ansible
root [ / ]# ./usr/bin/ansible --version
ansible [core 2.14.12]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = ./usr/bin/ansible
  python version = 3.9.19 (main, Mar 28 2024, 18:56:59) [GCC 11.2.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True

The latest version of ansible on the Azure linux is as ansible-2.14.12-1.cm2.

@surajssd surajssd added bug Something isn't working Triage-needed Triage needed by Cloud Shell team labels Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Triage-needed Triage needed by Cloud Shell team
Projects
None yet
Development

No branches or pull requests

1 participant