Script can`t check the right version of ansible?

Hello guys, Im trying to do some stuff from engineer regarding linux and I have a request to install using pip3 ansible version 4.10.0 which I do, but for some reason the script doesnt recognize it.
The command that I use is pip3 install ansible==4.10.0, pip list shows the correct version :expressionless: also the binary it`s available for everyone.

Hi @rbscthdr

Can you please provide use the curriculum and level on the task so we can check on it

Regard

Hello, for sure. If it`s my lack of knowledge, please let me know.

Hi @rbscthdr

It’s mentioned on the ticket that he should be available for all user.

Make sure Ansible binary is available globally on this system, i.e all users on this system are able to run Ansible commands.

Im aware of that. For example if we create a new user and using lets say ansible --version, it is working. No issues like ansible command not found or anything regarding this.

If you don`t mind, may you give me a hint ?

Even if I use thor@jump_host ~$ sudo cp .local/bin/ansible /usr/local/bin

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for thor:
thor@jump_host ~$ ls -la /usr/local/bin/
total 32
drwxr-xr-x 1 root root 4096 Aug 21 11:53 .
drwxr-xr-x 1 root root 4096 Feb 7 2023 …
-rwxr-xr-x 1 root root 6439 Aug 21 11:53 ansible
-rwxr-xr-x 1 root root 219 Aug 4 08:16 asciinema
-rwxr-xr-x 1 root root 227 Aug 4 08:16 pip
-rwxr-xr-x 1 root root 227 Aug 4 08:16 pip3
-rwxr-xr-x 1 root root 227 Aug 4 08:16 pip3.6
thor@jump_host ~$

It still doesn`t work…

Hi @rbscthdr
Try to install it with root user


I`ve tried to install it with root, the ansible command was not found :slight_smile:

Thank you but using root to install it aint the solution, since its not really working. If you try to do that you will get some warnings from ansible I suppose with finally not working unless youre using some sort of python virtual environment. If you dont mind, can show me what commands did you use to finish this lab ?

Youre right, but the ansible command doesnt work for root :slight_smile: .

Roger that. Thank you for your help and time ! Really useful !