Use {{ ansible_python.executable }} instead of python in integration tests. (#47340)

pull/45073/merge
Felix Fontein 6 years ago committed by Martin Krizek
parent 013c44484a
commit d2f524fb27

@ -1,6 +1,6 @@
---
- name: register cryptography version
command: python -c 'import cryptography; print(cryptography.__version__)'
command: "{{ ansible_python.executable }} -c 'import cryptography; print(cryptography.__version__)'"
register: cryptography_version
- block:

@ -1,7 +1,7 @@
- hosts: testhost
tasks:
- name: register pyOpenSSL version
command: python -c 'import OpenSSL; print(OpenSSL.__version__)'
command: "{{ ansible_python.executable }} -c 'import OpenSSL; print(OpenSSL.__version__)'"
register: pyopenssl_version
- name: Test lookup hashi_vault

@ -256,11 +256,11 @@
extra_args: --user --upgrade --root {{ output_dir }}/pip_root
- name: register python_site_lib
command: 'python -c "import site; print(site.USER_SITE)"'
command: '{{ ansible_python.executable }} -c "import site; print(site.USER_SITE)"'
register: pip_python_site_lib
- name: register python_user_base
command: 'python -c "import site; print(site.USER_BASE)"'
command: '{{ ansible_python.executable }} -c "import site; print(site.USER_BASE)"'
register: pip_python_user_base
- name: run test module

@ -4,7 +4,7 @@
register: openssl_version
- name: register cryptography version
command: python -c 'import cryptography; print(cryptography.__version__)'
command: "{{ ansible_python.executable }} -c 'import cryptography; print(cryptography.__version__)'"
register: cryptography_version
- debug: msg="ACME test container IP is {{ acme_host }}; OpenSSL version is {{ openssl_version.stdout }}; cryptography version is {{ cryptography_version.stdout }}"

@ -21,7 +21,7 @@
when: ansible_os_family == 'Darwin'
- name: register pyOpenSSL version
command: python -c 'import OpenSSL; print(OpenSSL.__version__)'
command: "{{ ansible_python.executable }} -c 'import OpenSSL; print(OpenSSL.__version__)'"
register: pyopenssl_version
- name: register openssl version
@ -29,5 +29,5 @@
register: openssl_version
- name: register cryptography version
command: python -c 'import cryptography; print(cryptography.__version__)'
command: "{{ ansible_python.executable }} -c 'import cryptography; print(cryptography.__version__)'"
register: cryptography_version

@ -16,7 +16,7 @@
print(response['Account'])
- name: get the aws account id
command: python "{{ output_dir }}/sts.py"
command: "{{ ansible_python.executable }} '{{ output_dir }}/sts.py'"
environment:
AWS_ACCESS_KEY_ID: "{{ aws_access_key }}"
AWS_SECRET_ACCESS_KEY: "{{ aws_secret_key }}"

Loading…
Cancel
Save