|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
- name: regression/issue_152__virtualenv_python_fails.yml
|
|
|
|
|
any_errors_fatal: true
|
|
|
|
|
gather_facts: true
|
|
|
|
|
hosts: test-targets
|
|
|
|
|
tasks:
|
|
|
|
|
- custom_python_detect_environment:
|
|
|
|
@ -14,6 +15,10 @@
|
|
|
|
|
no_proxy: "{{ lookup('env', 'no_proxy')|default('') }}"
|
|
|
|
|
PATH: "{{ lookup('env', 'PATH') }}"
|
|
|
|
|
|
|
|
|
|
# virtualenv on Mac points to /usr/local/Cellar/python/3.7.2_1/bin/python3.7 as the sys.executable
|
|
|
|
|
# which matches up with the .Python set up in /tmp/issue_152_virtualenv:
|
|
|
|
|
# .Python -> /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/Python
|
|
|
|
|
# on Mac, lout's sys.executable is the normal /usr/bin/python
|
|
|
|
|
- custom_python_detect_environment:
|
|
|
|
|
vars:
|
|
|
|
|
ansible_python_interpreter: /tmp/issue_152_virtualenv/bin/python
|
|
|
|
@ -23,7 +28,12 @@
|
|
|
|
|
- assert:
|
|
|
|
|
that:
|
|
|
|
|
- out.sys_executable == "/tmp/issue_152_virtualenv/bin/python"
|
|
|
|
|
when: lout.python_version > '2.6'
|
|
|
|
|
when: lout.python_version > '2.6' and ansible_os_family != 'Darwin'
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
|
that:
|
|
|
|
|
- "'/usr/local/Cellar/python' in out.sys_executable"
|
|
|
|
|
when: lout.python_version > '2.6' and ansible_os_family == 'Darwin'
|
|
|
|
|
|
|
|
|
|
- file:
|
|
|
|
|
path: /tmp/issue_152_virtualenv
|
|
|
|
|