python_2_3_test: Add result_ prefix to registered result from py3test.py script

For consitency the result_ prefix has been added to the registered result
of the py3test.py script.
This commit is contained in:
Thomas Woerner
2019-03-26 14:03:31 +01:00
parent 5b770ae135
commit 7ce09b2cc9
3 changed files with 11 additions and 11 deletions

View File

@@ -1,16 +1,16 @@
- block:
- name: Verify Python3 import
script: py3test.py
register: py3test
register: result_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
when: result_py3test.rc == 0
- name: Set python interpreter to 2
set_fact:
ansible_python_interpreter: "/usr/bin/python2"
when: py3test.failed or py3test.rc != 0
when: result_py3test.failed or result_py3test.rc != 0

View File

@@ -1,20 +1,20 @@
- block:
- name: Verify Python3 import
script: py3test.py
register: py3test
register: result_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
when: result_py3test.rc == 0
- name: Fail for IPA 4.5.90
fail: msg="You need to install python2 bindings for ipa server usage"
when: py3test.rc != 0 and "not usable with python3" in py3test.stdout
when: result_py3test.rc != 0 and "not usable with python3" in result_py3test.stdout
- name: Set python interpreter to 2
set_fact:
ansible_python_interpreter: "/usr/bin/python2"
when: py3test.failed or py3test.rc != 0
when: result_py3test.failed or result_py3test.rc != 0

View File

@@ -1,20 +1,20 @@
- block:
- name: Verify Python3 import
script: py3test.py
register: py3test
register: result_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
when: result_py3test.rc == 0
- name: Fail for IPA 4.5.90
fail: msg="You need to install python2 bindings for ipa server usage"
when: py3test.rc != 0 and "not usable with python3" in py3test.stdout
when: result_py3test.rc != 0 and "not usable with python3" in result_py3test.stdout
- name: Set python interpreter to 2
set_fact:
ansible_python_interpreter: "/usr/bin/python2"
when: py3test.failed or py3test.rc != 0
when: result_py3test.failed or result_py3test.rc != 0