|
@@ -18,6 +18,7 @@
|
|
|
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
|
|
|
|
|
|
- name: Uninstall Master system container package
|
|
|
command: >
|
|
@@ -26,11 +27,51 @@
|
|
|
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
|
|
|
|
|
|
- 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
|
|
|
+ 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)
|
|
|
+ - (openshift.common.version is defined) and (openshift.common.version == openshift_version) | bool
|
|
|
+ - openshift.master.ha is defined and openshift.master.ha | bool
|
|
|
+
|
|
|
+- 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)
|
|
|
+ - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) | bool
|
|
|
+ - openshift.master.ha is defined and openshift.master.ha | bool
|
|
|
+
|
|
|
+- 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:
|
|
|
+ - (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
|
|
|
notify:
|
|
|
- restart master
|