|
|
@ -83,11 +83,11 @@ def run_interpreter_discovery_if_necessary(s, task_vars, action):
|
|
|
|
Triggers ansible python interpreter discovery if requested.
|
|
|
|
Triggers ansible python interpreter discovery if requested.
|
|
|
|
Caches this value the same way Ansible does it.
|
|
|
|
Caches this value the same way Ansible does it.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
# special case where we've already called discover_interpreter which then
|
|
|
|
# _finding_python_interpreter is a special case where we've already called discover_interpreter which then
|
|
|
|
# calls low_level_exec_command which then retriggers spec.python_path()
|
|
|
|
# calls low_level_exec_command which then retriggers spec.python_path()
|
|
|
|
# in connect_ssh(), so we'll return the default '/usr/bin/python' to finish building the stack
|
|
|
|
# in connect_ssh(), so we'll return the default '/usr/bin/python' to finish building the stack
|
|
|
|
# TODO: possible issues here? Chicken-and-egg issue, in order to `connect_ssh` we need a python path
|
|
|
|
# TODO: possible issues here? Chicken-and-egg issue, in order to `connect_ssh` we need a python path
|
|
|
|
if action._finding_python_interpreter:
|
|
|
|
if action is None or action._finding_python_interpreter or s is None:
|
|
|
|
return '/usr/bin/python'
|
|
|
|
return '/usr/bin/python'
|
|
|
|
|
|
|
|
|
|
|
|
if s in ['auto', 'auto_legacy', 'auto_silent', 'auto_legacy_silent']:
|
|
|
|
if s in ['auto', 'auto_legacy', 'auto_silent', 'auto_legacy_silent']:
|
|
|
|