summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/tasks/node_system_container.yml
blob: 3ae5c7600e436b6604e281ba6429e3a9f721fd29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
- name: Pre-pull node system container image
  command: >
    atomic pull --storage=ostree {{ openshift.common.system_images_registry }}/{{ openshift.node.node_system_image }}:{{ openshift_image_tag }}
  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:
  - l_is_same_version
  - ("node" in result.stdout)

- name: Uninstall Node system container package
  command: >
    atomic uninstall {{ openshift.common.service_type }}-node
  failed_when: False
  when:
  - not l_is_same_version
  - ("node" in result.stdout)

- 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:
  - not l_is_same_version or ("node" not in result.stdout) | bool