Open YuryHrytsuk opened 3 months ago
Ansible uses different python versions on machines
Below is the outpuf of python -V executed in ansible-console
python -V
ansible-console
serv02 | CHANGED | rc=0 >> Python 3.10.12 serv03 | CHANGED | rc=0 >> Python 3.10.12 serv04 | CHANGED | rc=0 >> Python 3.8.10 serv01 | CHANGED | rc=0 >> Python 3.10.12
Ansible run playbooks on machines with the same python version. Ideally, it should use pyenv's python
pyenv
if ansible-console doesnt "see" pyenv, this might be related to the session not being a "login-shell", e.g. not sourcing .bashrc
.bashrc
Actual behavior
Ansible uses different python versions on machines
Below is the outpuf of
python -V
executed inansible-console
Desired behavior
Ansible run playbooks on machines with the same python version. Ideally, it should use
pyenv
's python