Merge "Make it more explicit that rhsm_activation_key and rhsm_repos are exclusive"

This commit is contained in:
Zuul 2018-11-28 17:03:45 +00:00 committed by Gerrit Code Review
commit 1d4724b637
2 changed files with 39 additions and 3 deletions

View File

@ -58,8 +58,20 @@ Dependencies
None.
Example Playbook
----------------
About repositories
------------------
If you are using an activation key, the repositories that are associated to
the subscription are configured in the Red Hat portal or in your local
instance of Satellite. You can't specify rhsm_repos parameter if you are
using rhsm_activation_key.
Otherwise, if you use rhsm_username and rhsm_password, you can use rhsm_repos
to select which parameters are deployed.
Example Playbook with Red Hat portal
------------------------------------
::
@ -68,9 +80,26 @@ Example Playbook
rhsm_username: bob.smith@acme.com
rhsm_password: "{{ vault_rhsm_password }}"
rhsm_repos:
- rhel-7-server-rpms
- rhel-7-server-extras-rpms
- rhel-7-server-rh-common-rpms
- rhel-7-server-openstack-8-rpms
- rhel-ha-for-rhel-7-server-rpms
roles:
- openstack.redhat-subscription
Example Playbook with Satellite 6
---------------------------------
::
- hosts: all
vars:
rhsm_activation_key: "secrete_key"
rhsm_org_id: "Default_Organization"
rhsm_server_hostname: "mysatserver.com"
rhsm_baseurl: "https://mysatserver.com/pulp/repos"
rhsm_method: satellite
rhsm_insecure: yes
roles:
- openstack.redhat-subscription

View File

@ -4,6 +4,13 @@
tags:
- rhsm
- name: Inform the operators if both rhsm_activation_key and rhsm_repos are given
debug:
msg: "rhsm_repos and rhsm_activation_key are exclusive options"
when:
- rhsm_repos | length > 0
- rhsm_activation_key is defined
- name: Configure Red Hat Subscription Manager
template:
src: rhsm.conf.j2