summaryrefslogtreecommitdiffstats
path: root/roles/openshift_preflight/masters
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/masters
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/masters')
-rw-r--r--roles/openshift_preflight/masters/tasks/main.yml29
1 files changed, 7 insertions, 22 deletions
diff --git a/roles/openshift_preflight/masters/tasks/main.yml b/roles/openshift_preflight/masters/tasks/main.yml
index 80d7af208..35fb1e3ca 100644
--- a/roles/openshift_preflight/masters/tasks/main.yml
+++ b/roles/openshift_preflight/masters/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 master packages availability
check_yum_update:
packages:
- - atomic-openshift
- - atomic-openshift-clients
- - atomic-openshift-master
+ - "{{ openshift.common.service_type }}"
+ - "{{ openshift.common.service_type }}-clients"
+ - "{{ openshift.common.service_type }}-master"
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 master packages availability'})] }}"
- - name: main packages for origin
- when:
- - deployment_type == "origin"
- check_yum_update:
- packages:
- - origin
- - origin-clients
- - origin-master
- register: r
-
- - set_fact:
- oo_preflight_check_results: "{{ oo_preflight_check_results + [r|combine({'_task': 'main packages for origin'})] }}"
-
- - name: other master packages
+ - name: other master packages availability
check_yum_update:
packages:
- etcd
@@ -43,4 +28,4 @@
register: r
- set_fact:
- oo_preflight_check_results: "{{ oo_preflight_check_results + [r|combine({'_task': 'other master packages'})] }}"
+ oo_preflight_check_results: "{{ oo_preflight_check_results + [r|combine({'_task': 'other master packages availability'})] }}"