From 7ce09b2cc92562cf2cf33de063b27e102c06b179 Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoerner@redhat.com>
Date: Tue, 26 Mar 2019 14:03:31 +0100
Subject: [PATCH] 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.
---
 roles/ipaclient/tasks/python_2_3_test.yml  | 6 +++---
 roles/ipareplica/tasks/python_2_3_test.yml | 8 ++++----
 roles/ipaserver/tasks/python_2_3_test.yml  | 8 ++++----
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/roles/ipaclient/tasks/python_2_3_test.yml b/roles/ipaclient/tasks/python_2_3_test.yml
index 59f98812..55204f42 100644
--- a/roles/ipaclient/tasks/python_2_3_test.yml
+++ b/roles/ipaclient/tasks/python_2_3_test.yml
@@ -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
diff --git a/roles/ipareplica/tasks/python_2_3_test.yml b/roles/ipareplica/tasks/python_2_3_test.yml
index 6830457f..b70f3e62 100644
--- a/roles/ipareplica/tasks/python_2_3_test.yml
+++ b/roles/ipareplica/tasks/python_2_3_test.yml
@@ -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
diff --git a/roles/ipaserver/tasks/python_2_3_test.yml b/roles/ipaserver/tasks/python_2_3_test.yml
index 6830457f..b70f3e62 100644
--- a/roles/ipaserver/tasks/python_2_3_test.yml
+++ b/roles/ipaserver/tasks/python_2_3_test.yml
@@ -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
-- 
GitLab