|
|
|
@ -7,16 +7,18 @@
|
|
|
|
|
- name: integration/transport_config/python_path.yml
|
|
|
|
|
hosts: tc-python-path-unset
|
|
|
|
|
tasks:
|
|
|
|
|
- include: ../_mitogen_only.yml
|
|
|
|
|
- include_tasks: ../_mitogen_only.yml
|
|
|
|
|
- {mitogen_get_stack: {}, register: out}
|
|
|
|
|
- assert_equal:
|
|
|
|
|
left: out.result[0].kwargs.python_path
|
|
|
|
|
right: ["{{out.discovered_interpreter}}"]
|
|
|
|
|
tags:
|
|
|
|
|
- mitogen_only
|
|
|
|
|
|
|
|
|
|
- hosts: tc-python-path-hostvar
|
|
|
|
|
vars: {mitogen_via: tc-python-path-unset}
|
|
|
|
|
tasks:
|
|
|
|
|
- include: ../_mitogen_only.yml
|
|
|
|
|
- include_tasks: ../_mitogen_only.yml
|
|
|
|
|
- {mitogen_get_stack: {}, register: out}
|
|
|
|
|
- assert_equal:
|
|
|
|
|
left: out.result[0].kwargs.python_path
|
|
|
|
@ -24,21 +26,25 @@
|
|
|
|
|
- assert_equal:
|
|
|
|
|
left: out.result[1].kwargs.python_path
|
|
|
|
|
right: ["/hostvar/path/to/python"]
|
|
|
|
|
tags:
|
|
|
|
|
- mitogen_only
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Non-localhost with explicit ansible_python_interpreter
|
|
|
|
|
- hosts: tc-python-path-hostvar
|
|
|
|
|
tasks:
|
|
|
|
|
- include: ../_mitogen_only.yml
|
|
|
|
|
- include_tasks: ../_mitogen_only.yml
|
|
|
|
|
- {mitogen_get_stack: {}, register: out}
|
|
|
|
|
- assert_equal:
|
|
|
|
|
left: out.result[0].kwargs.python_path
|
|
|
|
|
right: [/hostvar/path/to/python]
|
|
|
|
|
tags:
|
|
|
|
|
- mitogen_only
|
|
|
|
|
|
|
|
|
|
- hosts: tc-python-path-unset
|
|
|
|
|
vars: {mitogen_via: tc-python-path-hostvar}
|
|
|
|
|
tasks:
|
|
|
|
|
- include: ../_mitogen_only.yml
|
|
|
|
|
- include_tasks: ../_mitogen_only.yml
|
|
|
|
|
- {mitogen_get_stack: {}, register: out}
|
|
|
|
|
- assert_equal:
|
|
|
|
|
left: out.result[0].kwargs.python_path
|
|
|
|
@ -46,21 +52,25 @@
|
|
|
|
|
- assert_equal:
|
|
|
|
|
left: out.result[1].kwargs.python_path
|
|
|
|
|
right: ["{{out.discovered_interpreter}}"]
|
|
|
|
|
tags:
|
|
|
|
|
- mitogen_only
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Implicit localhost gets ansible_python_interpreter=virtualenv interpreter
|
|
|
|
|
- hosts: localhost
|
|
|
|
|
tasks:
|
|
|
|
|
- include: ../_mitogen_only.yml
|
|
|
|
|
- include_tasks: ../_mitogen_only.yml
|
|
|
|
|
- {mitogen_get_stack: {}, register: out}
|
|
|
|
|
- assert_equal:
|
|
|
|
|
left: out.result[0].kwargs.python_path
|
|
|
|
|
right: ["{{ansible_playbook_python}}"]
|
|
|
|
|
tags:
|
|
|
|
|
- mitogen_only
|
|
|
|
|
|
|
|
|
|
- hosts: tc-python-path-unset
|
|
|
|
|
vars: {mitogen_via: localhost}
|
|
|
|
|
tasks:
|
|
|
|
|
- include: ../_mitogen_only.yml
|
|
|
|
|
- include_tasks: ../_mitogen_only.yml
|
|
|
|
|
- {mitogen_get_stack: {}, register: out}
|
|
|
|
|
- assert_equal:
|
|
|
|
|
left: out.result[0].kwargs.python_path
|
|
|
|
@ -68,22 +78,26 @@
|
|
|
|
|
- assert_equal:
|
|
|
|
|
left: out.result[1].kwargs.python_path
|
|
|
|
|
right: ["{{out.discovered_interpreter}}"]
|
|
|
|
|
tags:
|
|
|
|
|
- mitogen_only
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# explicit local connections get the same treatment as everything else.
|
|
|
|
|
- hosts: tc-python-path-local-unset
|
|
|
|
|
tasks:
|
|
|
|
|
- include: ../_mitogen_only.yml
|
|
|
|
|
- include_tasks: ../_mitogen_only.yml
|
|
|
|
|
- {mitogen_get_stack: {}, register: out}
|
|
|
|
|
- assert_equal:
|
|
|
|
|
left: out.result[0].kwargs.python_path
|
|
|
|
|
right: ["{{out.discovered_interpreter}}"]
|
|
|
|
|
tags:
|
|
|
|
|
- mitogen_only
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- hosts: localhost
|
|
|
|
|
vars: {mitogen_via: tc-python-path-local-unset}
|
|
|
|
|
tasks:
|
|
|
|
|
- include: ../_mitogen_only.yml
|
|
|
|
|
- include_tasks: ../_mitogen_only.yml
|
|
|
|
|
- {mitogen_get_stack: {}, register: out}
|
|
|
|
|
- assert_equal:
|
|
|
|
|
left: out.result[0].kwargs.python_path
|
|
|
|
@ -91,21 +105,25 @@
|
|
|
|
|
- assert_equal:
|
|
|
|
|
left: out.result[1].kwargs.python_path
|
|
|
|
|
right: ["{{ansible_playbook_python}}"]
|
|
|
|
|
tags:
|
|
|
|
|
- mitogen_only
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# explicit local connection with explicit interpreter
|
|
|
|
|
- hosts: tc-python-path-local-explicit
|
|
|
|
|
tasks:
|
|
|
|
|
- include: ../_mitogen_only.yml
|
|
|
|
|
- include_tasks: ../_mitogen_only.yml
|
|
|
|
|
- {mitogen_get_stack: {}, register: out}
|
|
|
|
|
- assert_equal:
|
|
|
|
|
left: out.result[0].kwargs.python_path
|
|
|
|
|
right: ["/a/b/c"]
|
|
|
|
|
tags:
|
|
|
|
|
- mitogen_only
|
|
|
|
|
|
|
|
|
|
- hosts: localhost
|
|
|
|
|
vars: {mitogen_via: tc-python-path-local-explicit}
|
|
|
|
|
tasks:
|
|
|
|
|
- include: ../_mitogen_only.yml
|
|
|
|
|
- include_tasks: ../_mitogen_only.yml
|
|
|
|
|
- {mitogen_get_stack: {}, register: out}
|
|
|
|
|
- assert_equal:
|
|
|
|
|
left: out.result[0].kwargs.python_path
|
|
|
|
@ -113,3 +131,5 @@
|
|
|
|
|
- assert_equal:
|
|
|
|
|
left: out.result[1].kwargs.python_path
|
|
|
|
|
right: ["{{ansible_playbook_python}}"]
|
|
|
|
|
tags:
|
|
|
|
|
- mitogen_only
|
|
|
|
|