mirror of
https://github.com/mitogen-hq/mitogen.git
synced 2025-02-26 21:00:41 +00:00
52 lines
1.2 KiB
YAML
52 lines
1.2 KiB
YAML
![]() |
# related: issue #511, #536
|
||
|
|
||
|
- name: integration/transport_config/python_path.yml
|
||
|
hosts: tc-python-path-unset
|
||
|
|
||
|
# When no ansible_python_interpreter is set, executor/module_common.py
|
||
|
# chooses "/usr/bin/python".
|
||
|
tasks:
|
||
|
- mitogen_get_stack:
|
||
|
register: out
|
||
|
- assert_equal:
|
||
|
left: out.result[0].kwargs.python_path
|
||
|
right: ["/usr/bin/python"]
|
||
|
|
||
|
|
||
|
- hosts: tc-python-path-hostvar
|
||
|
tasks:
|
||
|
- mitogen_get_stack:
|
||
|
register: out
|
||
|
- assert_equal:
|
||
|
left: out.result[0].kwargs.python_path
|
||
|
right: [/hostvar/path/to/python]
|
||
|
|
||
|
|
||
|
# Implicit localhost gets ansible_python_interpreter=virtualenv interpreter
|
||
|
- hosts: localhost
|
||
|
tasks:
|
||
|
- mitogen_get_stack:
|
||
|
register: out
|
||
|
- assert_equal:
|
||
|
left: out.result[0].kwargs.python_path
|
||
|
right: ["{{ansible_playbook_python}}"]
|
||
|
|
||
|
|
||
|
# explicit local connections get the same treatment as everything else.
|
||
|
- hosts: tc-python-path-local-unset
|
||
|
tasks:
|
||
|
- mitogen_get_stack:
|
||
|
register: out
|
||
|
- assert_equal:
|
||
|
left: out.result[0].kwargs.python_path
|
||
|
right: ["/usr/bin/python"]
|
||
|
|
||
|
|
||
|
- hosts: tc-python-path-local-explicit
|
||
|
tasks:
|
||
|
- mitogen_get_stack:
|
||
|
register: out
|
||
|
- assert_equal:
|
||
|
left: out.result[0].kwargs.python_path
|
||
|
right: ["/a/b/c"]
|