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

ansible_mitogen sometimes ignores ansible_facts.discovered_python_interpreter #1097

Closed
3 tasks
moreati opened this issue Aug 10, 2024 · 0 comments
Closed
3 tasks
Labels
affects-0.3 Issues related to 0.3.X Mitogen releases bug Code feature that hinders desired execution outcome

Comments

@moreati
Copy link
Member

moreati commented Aug 10, 2024

If no interpreter is configured in ansible.cfg and ansible_interpreter_python is not set, then Ansible >= 2.8 performs interpreter discovery on targets to determine the path of a suitable Python executable (e.g. /usr/bin/python3.8). When Mitogen is involved it should behave the same as vanilla Ansible. Currently it does not always

Ansible + Mitogen 0.3.8 ignores ansible_facts.discovered_python_interpreter in the following cases

  • Executing a JSONARGS style module
  • Executing a WANT_JSON style module
  • Executing a module that does not take arguments

In these cases Mitogen often falls back to /usr/bin/python. This has become more apparent while adding Ansible 10 (ansible-core 2.17) support, because Ansible 10 drops Python 2.x support on targets.

@moreati moreati added bug Code feature that hinders desired execution outcome affects-0.3 Issues related to 0.3.X Mitogen releases labels Aug 10, 2024
moreati added a commit to moreati/mitogen that referenced this issue Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-0.3 Issues related to 0.3.X Mitogen releases bug Code feature that hinders desired execution outcome
Projects
None yet
Development

No branches or pull requests

1 participant