ITISFoundation / osparc-ops-environments

osparc operations
MIT License
3 stars 6 forks source link

Ansible: use the same python interpreter #776

Open YuryHrytsuk opened 3 months ago

YuryHrytsuk commented 3 months ago

Actual behavior

Ansible uses different python versions on machines

Below is the outpuf of python -V executed in 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

Desired behavior

Ansible run playbooks on machines with the same python version. Ideally, it should use pyenv's python

mrnicegyu11 commented 2 months ago

if ansible-console doesnt "see" pyenv, this might be related to the session not being a "login-shell", e.g. not sourcing .bashrc