summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master/tasks/system_container.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_master/tasks/system_container.yml')
-rw-r--r--roles/openshift_master/tasks/system_container.yml47
1 files changed, 44 insertions, 3 deletions
diff --git a/roles/openshift_master/tasks/system_container.yml b/roles/openshift_master/tasks/system_container.yml
index e3e3d7948..a0e1ac75e 100644
--- a/roles/openshift_master/tasks/system_container.yml
+++ b/roles/openshift_master/tasks/system_container.yml
@@ -17,7 +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
+ - l_is_same_version
+ - not l_is_ha
- name: Uninstall Master system container package
command: >
@@ -25,12 +26,52 @@
failed_when: False
when:
- ("master" in result.stdout)
- - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) | 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
+ - not l_is_same_version or ("master" not in result.stdout) | bool
+ - not l_is_ha
+ notify:
+ - restart master
+
+# HA
+- name: Update Master HA system container package
+ command: >
+ atomic containers update {{ openshift.common.service_type }}-master-{{ item }}
+ register: update_result
+ changed_when: "'Extracting' in update_result.stdout"
+ with_items:
+ - api
+ - controllers
+ when:
+ - ("master" in result.stdout)
+ - l_is_same_version
+ - l_is_ha
+
+- name: Uninstall Master HA system container package
+ command: >
+ atomic uninstall {{ openshift.common.service_type }}-master-{{ item }}
+ failed_when: False
+ with_items:
+ - api
+ - controllers
+ when:
+ - ("master" in result.stdout)
+ - not l_is_same_version
+ - l_is_ha
+
+- name: Install Master HA system container package
+ command: >
+ atomic install --system --set COMMAND={{ item }} --name={{ openshift.common.service_type }}-master-{{ item }} {{ openshift.common.system_images_registry }}/{{ openshift.master.master_system_image }}:{{ openshift_image_tag }}
+ with_items:
+ - api
+ - controllers
+ when:
+ - not l_is_same_version or ("master" not in result.stdout) | bool
+ - l_is_ha
notify:
- restart master