summaryrefslogtreecommitdiffstats
path: root/roles/openshift_preflight/nodes
diff options
context:
space:
mode:
authorRodolfo Carvalho <rhcarvalho@gmail.com>2017-01-12 19:16:03 +0100
committerRodolfo Carvalho <rhcarvalho@gmail.com>2017-01-12 19:16:03 +0100
commitc6febeb11af247f156218542f98f52566cf22931 (patch)
treef35b450a53662fe50065ab832758d5a62ddee9e2 /roles/openshift_preflight/nodes
parentc4aec0fbd112fd1c8503e935ac954da268a2fdff (diff)
downloadopenshift-c6febeb11af247f156218542f98f52566cf22931.tar.gz
openshift-c6febeb11af247f156218542f98f52566cf22931.tar.bz2
openshift-c6febeb11af247f156218542f98f52566cf22931.tar.xz
openshift-c6febeb11af247f156218542f98f52566cf22931.zip
Reduce code duplication using variable
We can use openshift_facts's service_type to determine the package names.
Diffstat (limited to 'roles/openshift_preflight/nodes')
-rw-r--r--roles/openshift_preflight/nodes/tasks/main.yml29
1 files changed, 7 insertions, 22 deletions
diff --git a/roles/openshift_preflight/nodes/tasks/main.yml b/roles/openshift_preflight/nodes/tasks/main.yml
index c98b02bf5..a10e69024 100644
--- a/roles/openshift_preflight/nodes/tasks/main.yml
+++ b/roles/openshift_preflight/nodes/tasks/main.yml
@@ -3,33 +3,18 @@
- when: not openshift.common.is_containerized | bool
block:
- - name: main packages for enterprise
- when:
- - deployment_type == "openshift-enterprise"
+ - name: main node packages availability
check_yum_update:
packages:
- - atomic-openshift
- - atomic-openshift-node
- - atomic-openshift-sdn-ovs
+ - "{{ openshift.common.service_type }}"
+ - "{{ openshift.common.service_type }}-node"
+ - "{{ openshift.common.service_type }}-sdn-ovs"
register: r
- set_fact:
- oo_preflight_check_results: "{{ oo_preflight_check_results + [r|combine({'_task': 'main packages for enterprise'})] }}"
+ oo_preflight_check_results: "{{ oo_preflight_check_results + [r|combine({'_task': 'main node packages availability'})] }}"
- - name: main packages for origin
- when:
- - deployment_type == "origin"
- check_yum_update:
- packages:
- - origin
- - origin-node
- - origin-sdn-ovs
- register: r
-
- - set_fact:
- oo_preflight_check_results: "{{ oo_preflight_check_results + [r|combine({'_task': 'main packages for origin'})] }}"
-
- - name: other node packages
+ - name: other node packages availability
check_yum_update:
packages:
- docker
@@ -53,4 +38,4 @@
register: r
- set_fact:
- oo_preflight_check_results: "{{ oo_preflight_check_results + [r|combine({'_task': 'other node packages'})] }}"
+ oo_preflight_check_results: "{{ oo_preflight_check_results + [r|combine({'_task': 'other node packages availability'})] }}"