mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-06-10 10:45:55 +00:00
For consitency the result_ prefix has been added to the registered result of the py3test.py script.
17 lines
443 B
YAML
17 lines
443 B
YAML
- block:
|
|
- name: Verify Python3 import
|
|
script: py3test.py
|
|
register: result_py3test
|
|
failed_when: False
|
|
changed_when: False
|
|
|
|
- name: Set python interpreter to 3
|
|
set_fact:
|
|
ansible_python_interpreter: "/usr/bin/python3"
|
|
when: result_py3test.rc == 0
|
|
|
|
- name: Set python interpreter to 2
|
|
set_fact:
|
|
ansible_python_interpreter: "/usr/bin/python2"
|
|
when: result_py3test.failed or result_py3test.rc != 0
|