summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_node/tasks/node_system_container.yml11
-rw-r--r--roles/openshift_node/tasks/openvswitch_system_container.yml7
-rw-r--r--roles/openshift_node/vars/main.yml2
3 files changed, 10 insertions, 10 deletions
diff --git a/roles/openshift_node/tasks/node_system_container.yml b/roles/openshift_node/tasks/node_system_container.yml
index bb1f4a4dd..3ae5c7600 100644
--- a/roles/openshift_node/tasks/node_system_container.yml
+++ b/roles/openshift_node/tasks/node_system_container.yml
@@ -16,17 +16,16 @@
register: update_result
changed_when: "'Extracting' in update_result.stdout"
when:
- - openshift.common.version is defined
- - openshift.common.version == openshift_version
- - ("node" in result.stdout) | bool
+ - 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:
- - (openshift.common.version is not defined) or (openshift.common.version != openshift_version)
- - ("node" in result.stdout) | bool
+ - not l_is_same_version
+ - ("node" in result.stdout)
- name: Install Node system container package
command: >
@@ -34,4 +33,4 @@
register: install_node_result
changed_when: "'Extracting' in pull_result.stdout"
when:
- - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) or ("node" not in result.stdout) | bool
+ - not l_is_same_version or ("node" not in result.stdout) | bool
diff --git a/roles/openshift_node/tasks/openvswitch_system_container.yml b/roles/openshift_node/tasks/openvswitch_system_container.yml
index 69d028b92..6114230d0 100644
--- a/roles/openshift_node/tasks/openvswitch_system_container.yml
+++ b/roles/openshift_node/tasks/openvswitch_system_container.yml
@@ -16,8 +16,7 @@
register: update_result
changed_when: "'Extracting' in update_result.stdout"
when:
- - openshift.common.version is defined
- - openshift.common.version == openshift_version
+ - l_is_same_version
- ("openvswitch" in result.stdout) | bool
- name: Uninstall OpenvSwitch system container package
@@ -25,13 +24,13 @@
atomic uninstall openvswitch
failed_when: False
when:
- - (openshift.common.version is not defined) or (openshift.common.version != openshift_version)
+ - not l_is_same_version
- ("openvswitch" in result.stdout) | bool
- name: Install OpenvSwitch system container package
command: >
atomic install --system --name=openvswitch {{ openshift.common.system_images_registry }}/{{ openshift.node.ovs_system_image }}:{{ openshift_image_tag }}
when:
- - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) or ("openvswitch" not in result.stdout) | bool
+ - not l_is_same_version or ("openvswitch" not in result.stdout) | bool
notify:
- restart docker
diff --git a/roles/openshift_node/vars/main.yml b/roles/openshift_node/vars/main.yml
new file mode 100644
index 000000000..0c2abf3b9
--- /dev/null
+++ b/roles/openshift_node/vars/main.yml
@@ -0,0 +1,2 @@
+---
+l_is_same_version: "{{ (openshift.common.version is defined) and (openshift.common.version == openshift_version) | bool }}"