summaryrefslogtreecommitdiffstats
path: root/roles/rhel_subscribe/tasks
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2016-01-11 10:16:09 -0500
committerThomas Wiest <twiest@users.noreply.github.com>2016-01-11 10:16:09 -0500
commit0e60de158e27b6f15adc943db703fec4bd2c72bc (patch)
tree282251a948f1fe14d7af4366e0d32fda27c4670e /roles/rhel_subscribe/tasks
parentc64ca552a15885b5811e535f81678a1dc80c0087 (diff)
parent0c056112112886e0d5683a10eec3368695c96e88 (diff)
downloadopenshift-0e60de158e27b6f15adc943db703fec4bd2c72bc.tar.gz
openshift-0e60de158e27b6f15adc943db703fec4bd2c72bc.tar.bz2
openshift-0e60de158e27b6f15adc943db703fec4bd2c72bc.tar.xz
openshift-0e60de158e27b6f15adc943db703fec4bd2c72bc.zip
Merge pull request #1128 from lhuard1A/bin_cluster_ose_3.1
Make bin/cluster able to spawn an OSE 3.1 cluster
Diffstat (limited to 'roles/rhel_subscribe/tasks')
-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 c160ea4e9..eecfd04a0 100644
--- a/roles/rhel_subscribe/tasks/main.yml
+++ b/roles/rhel_subscribe/tasks/main.yml
@@ -41,4 +41,4 @@
command: subscription-manager subscribe --pool {{ openshift_pool_id.stdout_lines[0] }}
- include: enterprise.yml
- when: deployment_type == 'enterprise'
+ when: deployment_type in [ 'enterprise', 'atomic-enterprise', 'openshift-enterprise' ]