Skip to content

ansible_mitogen sometimes ignores ansible_facts.discovered_python_interpreter #1097

@moreati

Description

@moreati

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-0.3Issues related to 0.3.X Mitogen releasesbugCode feature that hinders desired execution outcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions