summaryrefslogtreecommitdiffstats
path: root/roles/rhel_subscribe
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2015-11-13 10:48:15 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2015-11-13 10:48:15 -0500
commit8c91a881f135d4c1b62208b6ce44a29165edafc2 (patch)
tree67322cc194c9a9a65e0c95335795b702097450f6 /roles/rhel_subscribe
parentf7b535a898da05b84be3b93f16e2e7732f865c25 (diff)
parent5e5b3f76218195b968727a3cdf0e0e982500a933 (diff)
downloadopenshift-8c91a881f135d4c1b62208b6ce44a29165edafc2.tar.gz
openshift-8c91a881f135d4c1b62208b6ce44a29165edafc2.tar.bz2
openshift-8c91a881f135d4c1b62208b6ce44a29165edafc2.tar.xz
openshift-8c91a881f135d4c1b62208b6ce44a29165edafc2.zip
Merge pull request #706 from codificat/register-sat
RH subscription: optional satellite and pkg update
Diffstat (limited to 'roles/rhel_subscribe')
-rw-r--r--roles/rhel_subscribe/tasks/main.yml11
1 files changed, 9 insertions, 2 deletions
diff --git a/roles/rhel_subscribe/tasks/main.yml b/roles/rhel_subscribe/tasks/main.yml
index 8fb2fc042..30c0920a1 100644
--- a/roles/rhel_subscribe/tasks/main.yml
+++ b/roles/rhel_subscribe/tasks/main.yml
@@ -6,19 +6,26 @@
- set_fact:
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) }}"
- fail:
msg: "This role is only supported for Red Hat hosts"
when: ansible_distribution != 'RedHat'
- fail:
- msg: Either rsub_user or the rhel_subscription_user env variable are required for this role.
+ msg: Either rhsub_user or the rhel_subscription_user env variable are required for this role.
when: rhel_subscription_user is not defined
- fail:
- msg: Either rsub_pass or the rhel_subscription_pass env variable are required for this role.
+ msg: Either rhsub_pass or the rhel_subscription_pass env variable are required for this role.
when: rhel_subscription_pass is not defined
+- name: Satellite preparation
+ command: "rpm -Uvh http://{{ rhel_subscription_server }}/pub/katello-ca-consumer-latest.noarch.rpm"
+ args:
+ creates: /etc/rhsm/ca/katello-server-ca.pem
+ when: rhel_subscription_server is defined and rhel_subscription_server
+
- name: RedHat subscriptions
redhat_subscription:
username: "{{ rhel_subscription_user }}"