1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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

This commit is contained in:
Felix Fontein 2018-10-19 09:00:34 +02:00 committed by Martin Krizek
parent 013c44484a
commit d2f524fb27
6 changed files with 8 additions and 8 deletions

View file

@ -1,6 +1,6 @@
--- ---
- name: register cryptography 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 register: cryptography_version
- block: - block:

View file

@ -1,7 +1,7 @@
- hosts: testhost - hosts: testhost
tasks: tasks:
- name: register pyOpenSSL version - 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 register: pyopenssl_version
- name: Test lookup hashi_vault - name: Test lookup hashi_vault

View file

@ -256,11 +256,11 @@
extra_args: --user --upgrade --root {{ output_dir }}/pip_root extra_args: --user --upgrade --root {{ output_dir }}/pip_root
- name: register python_site_lib - 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 register: pip_python_site_lib
- name: register python_user_base - 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 register: pip_python_user_base
- name: run test module - name: run test module

View file

@ -4,7 +4,7 @@
register: openssl_version register: openssl_version
- name: register cryptography 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 register: cryptography_version
- debug: msg="ACME test container IP is {{ acme_host }}; OpenSSL version is {{ openssl_version.stdout }}; cryptography version is {{ cryptography_version.stdout }}" - debug: msg="ACME test container IP is {{ acme_host }}; OpenSSL version is {{ openssl_version.stdout }}; cryptography version is {{ cryptography_version.stdout }}"

View file

@ -21,7 +21,7 @@
when: ansible_os_family == 'Darwin' when: ansible_os_family == 'Darwin'
- name: register pyOpenSSL version - 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 register: pyopenssl_version
- name: register openssl version - name: register openssl version
@ -29,5 +29,5 @@
register: openssl_version register: openssl_version
- name: register cryptography 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 register: cryptography_version

View file

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