diff options
author | Thomas Wiest <twiest@users.noreply.github.com> | 2016-01-06 15:41:17 -0500 |
---|---|---|
committer | Thomas Wiest <twiest@users.noreply.github.com> | 2016-01-06 15:41:17 -0500 |
commit | 02de437221381a0d209c903bb1851ea58e605480 (patch) | |
tree | ba2f322e3b13e650aa3e28843ef58caff6a62412 | |
parent | 31a18b4e6096451bd81603b92a2d4cf7d21cecef (diff) | |
parent | 7b5228e668857f8efef5a2f8ee2c6cc2dc556577 (diff) | |
download | openshift-02de437221381a0d209c903bb1851ea58e605480.tar.gz openshift-02de437221381a0d209c903bb1851ea58e605480.tar.bz2 openshift-02de437221381a0d209c903bb1851ea58e605480.tar.xz openshift-02de437221381a0d209c903bb1851ea58e605480.zip |
Merge pull request #1113 from lhuard1A/fix_subscription
Fix RHN subscription by explicitly attaching to the right pool
-rw-r--r-- | roles/rhel_subscribe/tasks/main.yml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/roles/rhel_subscribe/tasks/main.yml b/roles/rhel_subscribe/tasks/main.yml index 30c0920a1..c160ea4e9 100644 --- a/roles/rhel_subscribe/tasks/main.yml +++ b/roles/rhel_subscribe/tasks/main.yml @@ -4,6 +4,7 @@ # to make it able to enable repositories - set_fact: + rhel_subscription_pool: "{{ lookup('oo_option', 'rhel_subscription_pool') | default(rhsub_pool, True) | default('OpenShift Enterprise, Premium*', True) }}" rhel_subscription_user: "{{ lookup('oo_option', 'rhel_subscription_user') | default(rhsub_user, True) | default(omit, True) }}" rhel_subscription_pass: "{{ lookup('oo_option', 'rhel_subscription_pass') | default(rhsub_pass, True) | default(omit, True) }}" rhel_subscription_server: "{{ lookup('oo_option', 'rhel_subscription_server') | default(rhsub_server) }}" @@ -30,7 +31,14 @@ redhat_subscription: username: "{{ rhel_subscription_user }}" password: "{{ rhel_subscription_pass }}" - autosubscribe: yes + +- name: Retrieve the OpenShift Pool ID + command: subscription-manager list --available --matches="{{ rhel_subscription_pool }}" --pool-only + register: openshift_pool_id + changed_when: False + +- name: Attach to OpenShift Pool + command: subscription-manager subscribe --pool {{ openshift_pool_id.stdout_lines[0] }} - include: enterprise.yml when: deployment_type == 'enterprise' |