mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-02 19:33:09 +00:00
- Do not register a change in the playbook run when registering the variable checking for whether or not Python 3 imports work Signed-off-by: Kellin <kellin@retromud.org>
17 lines
415 B
YAML
17 lines
415 B
YAML
- block:
|
|
- name: Verify Python3 import
|
|
script: py3test.py
|
|
register: py3test
|
|
failed_when: False
|
|
changed_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
|