|
@@ -5,15 +5,30 @@
|
|
|
register: pull_result
|
|
|
changed_when: "'Pulling layer' in pull_result.stdout"
|
|
|
|
|
|
+- name: Check Node system container package
|
|
|
+ command: >
|
|
|
+ atomic containers list --no-trunc -a -f container={{ openshift.common.service_type }}-node
|
|
|
+ register: result
|
|
|
+
|
|
|
+- name: Update Node system container package
|
|
|
+ command: >
|
|
|
+ atomic containers update {{ openshift.common.service_type }}-node
|
|
|
+ register: update_result
|
|
|
+ changed_when: "'Extracting' in update_result.stdout"
|
|
|
+ when:
|
|
|
+ - (openshift.common.version is defined) and (openshift.common.version == openshift_version) and ("node" in result.stdout) | bool
|
|
|
+
|
|
|
- name: Uninstall Node system container package
|
|
|
command: >
|
|
|
atomic uninstall {{ openshift.common.service_type }}-node
|
|
|
failed_when: False
|
|
|
- when: openshift.common.version != openshift_version | bool
|
|
|
+ when:
|
|
|
+ - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) and ("node" in result.stdout) | bool
|
|
|
|
|
|
- name: Install Node system container package
|
|
|
command: >
|
|
|
atomic install --system --name={{ openshift.common.service_type }}-node {{ openshift.common.system_images_registry }}/{{ openshift.node.node_system_image }}:{{ openshift_image_tag }}
|
|
|
register: install_node_result
|
|
|
changed_when: "'Extracting' in pull_result.stdout"
|
|
|
- when: openshift.common.version != openshift_version | bool
|
|
|
+ when:
|
|
|
+ - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) or ("node" not in result.stdout) | bool
|