summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_master/tasks/system_container.yml24
-rw-r--r--roles/openshift_master/vars/main.yml3
2 files changed, 15 insertions, 12 deletions
diff --git a/roles/openshift_master/tasks/system_container.yml b/roles/openshift_master/tasks/system_container.yml
index 90cbc243d..a0e1ac75e 100644
--- a/roles/openshift_master/tasks/system_container.yml
+++ b/roles/openshift_master/tasks/system_container.yml
@@ -17,8 +17,8 @@
changed_when: "'Extracting' in update_result.stdout"
when:
- ("master" in result.stdout)
- - (openshift.common.version is defined) and (openshift.common.version == openshift_version) | bool
- - openshift.master.ha is not defined or not openshift.master.ha | bool
+ - l_is_same_version
+ - not l_is_ha
- name: Uninstall Master system container package
command: >
@@ -26,15 +26,15 @@
failed_when: False
when:
- ("master" in result.stdout)
- - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) | bool
- - openshift.master.ha is not defined or not openshift.master.ha | bool
+ - not l_is_same_version
+ - not l_is_ha
- name: Install Master system container package
command: >
atomic install --system --name={{ openshift.common.service_type }}-master {{ openshift.common.system_images_registry }}/{{ openshift.master.master_system_image }}:{{ openshift_image_tag }}
when:
- - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) or ("master" not in result.stdout) | bool
- - openshift.master.ha is not defined or not openshift.master.ha | bool
+ - not l_is_same_version or ("master" not in result.stdout) | bool
+ - not l_is_ha
notify:
- restart master
@@ -49,8 +49,8 @@
- controllers
when:
- ("master" in result.stdout)
- - (openshift.common.version is defined) and (openshift.common.version == openshift_version) | bool
- - openshift.master.ha is defined and openshift.master.ha | bool
+ - l_is_same_version
+ - l_is_ha
- name: Uninstall Master HA system container package
command: >
@@ -61,8 +61,8 @@
- controllers
when:
- ("master" in result.stdout)
- - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) | bool
- - openshift.master.ha is defined and openshift.master.ha | bool
+ - not l_is_same_version
+ - l_is_ha
- name: Install Master HA system container package
command: >
@@ -71,7 +71,7 @@
- api
- controllers
when:
- - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) or ("master" not in result.stdout) | bool
- - openshift.master.ha is defined and openshift.master.ha | bool
+ - not l_is_same_version or ("master" not in result.stdout) | bool
+ - l_is_ha
notify:
- restart master
diff --git a/roles/openshift_master/vars/main.yml b/roles/openshift_master/vars/main.yml
index 01cd28c66..1e157097d 100644
--- a/roles/openshift_master/vars/main.yml
+++ b/roles/openshift_master/vars/main.yml
@@ -18,3 +18,6 @@ openshift_master_valid_grant_methods:
- auto
- prompt
- deny
+
+l_is_ha: "{{ openshift.master.ha is defined and openshift.master.ha | bool }}"
+l_is_same_version: "{{ (openshift.common.version is defined) and (openshift.common.version == openshift_version) | bool }}"