summaryrefslogtreecommitdiffstats
path: root/roles/rhel_subscribe
diff options
context:
space:
mode:
Diffstat (limited to 'roles/rhel_subscribe')
-rw-r--r--roles/rhel_subscribe/tasks/enterprise.yml8
1 files changed, 7 insertions, 1 deletions
diff --git a/roles/rhel_subscribe/tasks/enterprise.yml b/roles/rhel_subscribe/tasks/enterprise.yml
index 48b04b209..8acdfb969 100644
--- a/roles/rhel_subscribe/tasks/enterprise.yml
+++ b/roles/rhel_subscribe/tasks/enterprise.yml
@@ -1,4 +1,10 @@
---
+- set_fact:
+ openshift_release: "{{ openshift_release[1:] }}"
+ when:
+ - openshift_release is defined
+ - openshift_release[0] == 'v'
+
- name: Disable all repositories
command: subscription-manager repos --disable="*"
@@ -6,7 +12,7 @@
command: subscription-manager repos \
--enable="rhel-7-server-rpms" \
--enable="rhel-7-server-extras-rpms" \
- --enable="rhel-7-server-ose-{{ openshift_release }}-rpms" \
+ --enable="rhel-7-server-ose-{{ (openshift_release | default('')).split('.')[0:2] | join('.') }}-rpms" \
--enable="rhel-7-fast-datapath-rpms"
register: subscribe_repos
until: subscribe_repos | succeeded