diff --git a/ansible_mitogen/plugins/action/mitogen_get_stack.py b/ansible_mitogen/plugins/action/mitogen_get_stack.py index 171f84ea..0d0afe86 100644 --- a/ansible_mitogen/plugins/action/mitogen_get_stack.py +++ b/ansible_mitogen/plugins/action/mitogen_get_stack.py @@ -52,4 +52,6 @@ class ActionModule(ActionBase): 'changed': True, 'result': stack, '_ansible_verbose_always': True, + # for ansible < 2.8, we'll default to /usr/bin/python like before + 'discovered_interpreter': self._connection._action._discovered_interpreter } diff --git a/tests/ansible/integration/transport_config/python_path.yml b/tests/ansible/integration/transport_config/python_path.yml index 8ee9458e..e42c3b23 100644 --- a/tests/ansible/integration/transport_config/python_path.yml +++ b/tests/ansible/integration/transport_config/python_path.yml @@ -77,7 +77,8 @@ - {mitogen_get_stack: {}, register: out} - assert_equal: left: out.result[0].kwargs.python_path - right: ["/usr/bin/python"] + right: ["{{out.discovered_interpreter}}"] + - hosts: localhost vars: {mitogen_via: tc-python-path-local-unset}