Thanks for your help and detailed explanation on the Python interpreter selection in Ansible.
After our discussion, I confirmed that I can achieve my initial goal (prioritizing '/usr/bin/python3' when both '/usr/bin/python3' and '/usr/bin/python' are present, and automatically detecting other Python interpreters when '/usr/bin/python3' is not available) by adjusting the INTERPRETER_PYTHON setting.
Initially, I faced issues with the default behavior prioritizing '/usr/bin/python' when both were present. My environment is using Ansible 2.10, which sets INTERPRETER_PYTHON to 'auto_legacy' by default. Based on your advice, I found that changing INTERPRETER_PYTHON to 'auto' or 'auto_silent' resolved the issue in a straightforward manner.
I appreciate your assistance in resolving this problem.
Best regards,
Haji
2023年4月29日土曜日 19:00:57 UTC+9 Vladimir Botka: