This repository has been marked archived. Please see the uclalib_role_rhel8repos fork.
Ansible role that manages RHEL subscriptions and ensures the base set of RHEL7/CentOS7 yum repositories are enabled on the system.
If the host system is CentOS, subscription management is skipped.
If the host system is RHEL, you have option of attaching a Red Hat subscription using one of two methods:
- Defining variables for
Organization ID
andActivation Key
- Defining variables for
Username
,Password
,Pool ID
RHEL7 repositories include:
rhel-7-server-rpms
rhel-7-server-optional-rpms
rhel-7-server-supplementary-rpms
rhel-7-server-extras-rpms
CentOS7 repositories include:
base
updates
extras
You must have access to a valid Red Hat subscription account - options include:
- paid enterprise subscriptions
- free developer subscriptions
If you choose to use the Activation Key method:
- ensure the activation key is created within your account for your desired subscriptions
- reference: Creating Red Hat Customer Port Activation Keys
If you choose to use the Pool ID method:
- ensure you know your Red Hat portal username/password
- reference: Registration Assistant
Variables used when registering subscriptions via activation key:
-
rhel_org_id
- defines the organization ID associated with a Red Hat account -
rhel_activation_key
- defines the activation key associated with your valid Red Hat subscription
Variables used when registering subscriptions via pool ids
-
rhel_username
- defines the username of Red Hat account with privileges to register hosts -
rhel_password
- defines the password associated with username that has privileges to register hosts -
rhel_pool_id
- defines the pool ID that is associated with a Red Hat subscription
Variables used for package update exclusion
-
exclude_list
- defines the packages that are added to theyum.conf
exclusion list. This variable is designed to be site-wide as a base exclusion that will apply to all hosts. If this list is empty, any existing exclusions will be removed. -
exclude_list_extra
- defined additional packages that will be added to the exclude list. This variable is designed to be applied at the group or host level, for those hosts that have additional exclusion requirements beyond the base site-wide exclusion. If this list has entries, but theexclude_list
is empty then any defined exclusions will be removed.
None.
You'll want to define your subscription attachment variables within your playbook, group_vars, or host_vars.
A sample is provided below including variables using the activation key method within the playbook file:
- hosts: servers
vars:
rhel_org_id: "123456"
rhel_activation_key: "activation-key-string"
roles:
- { role: uclalib_role_rhel7repos }