summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorLénaïc Huard <lhuard@amadeus.com>2016-01-07 15:09:46 +0100
committerLénaïc Huard <lhuard@amadeus.com>2016-01-08 18:17:51 +0100
commit0c056112112886e0d5683a10eec3368695c96e88 (patch)
tree2207b1f1654cfff2f0b8e1fe5ac7efd8bd263bc5 /roles
parentb733e7fb2c79c6b7423c159681eba28417cdf599 (diff)
downloadopenshift-0c056112112886e0d5683a10eec3368695c96e88.tar.gz
openshift-0c056112112886e0d5683a10eec3368695c96e88.tar.bz2
openshift-0c056112112886e0d5683a10eec3368695c96e88.tar.xz
openshift-0c056112112886e0d5683a10eec3368695c96e88.zip
Make bin/cluster able to spawn OSE 3.1 clusters
Diffstat (limited to 'roles')
-rw-r--r--roles/rhel_subscribe/tasks/enterprise.yml18
-rw-r--r--roles/rhel_subscribe/tasks/main.yml2
2 files changed, 18 insertions, 2 deletions
diff --git a/roles/rhel_subscribe/tasks/enterprise.yml b/roles/rhel_subscribe/tasks/enterprise.yml
index e9e6e4bd4..08540f440 100644
--- a/roles/rhel_subscribe/tasks/enterprise.yml
+++ b/roles/rhel_subscribe/tasks/enterprise.yml
@@ -2,8 +2,24 @@
- name: Disable all repositories
command: subscription-manager repos --disable="*"
+- set_fact:
+ default_ose_version: '3.0'
+ when: deployment_type == 'enterprise'
+
+- set_fact:
+ default_ose_version: '3.1'
+ when: deployment_type in ['atomic-enterprise', 'openshift-enterprise']
+
+- set_fact:
+ ose_version: "{{ lookup('oo_option', 'ose_version') | default(default_ose_version, True) }}"
+
+- fail:
+ msg: "{{ ose_version }} is not a valid version for {{ deployment_type }} deployment type"
+ when: ( deployment_type == 'enterprise' and ose_version not in ['3.0'] ) or
+ ( deployment_type in ['atomic-enterprise', 'openshift-enterprise'] and ose_version not in ['3.1'] )
+
- name: Enable RHEL repositories
command: subscription-manager repos \
--enable="rhel-7-server-rpms" \
--enable="rhel-7-server-extras-rpms" \
- --enable="rhel-7-server-ose-3.0-rpms"
+ --enable="rhel-7-server-ose-{{ ose_version }}-rpms"
diff --git a/roles/rhel_subscribe/tasks/main.yml b/roles/rhel_subscribe/tasks/main.yml
index 30c0920a1..1f905ed5a 100644
--- a/roles/rhel_subscribe/tasks/main.yml
+++ b/roles/rhel_subscribe/tasks/main.yml
@@ -33,4 +33,4 @@
autosubscribe: yes
- include: enterprise.yml
- when: deployment_type == 'enterprise'
+ when: deployment_type in [ 'enterprise', 'atomic-enterprise', 'openshift-enterprise' ]