Files
ansible-freeipa/roles/ipaclient/tasks/python_2_3_test.yml
Thomas Woerner ccdd43f0b5 Extended python3 test to do an additional client test
The additional client test is needed to make sure that the client is
installed for python3 usage. The ipalib test has not been sufficient.
2017-10-13 16:13:57 +02:00

16 lines
391 B
YAML

- block:
- name: Verify Python3 import
script: py3test.py
register: py3test
failed_when: False
- name: Set python interpreter to 3
set_fact:
ansible_python_interpreter: "/usr/bin/python3"
when: py3test.rc == 0
- name: Set python interpreter to 2
set_fact:
ansible_python_interpreter: "/usr/bin/python2"
when: py3test.failed or py3test.rc != 0