Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Ansible role to ensure the base set of RHEL7 yum repositories are enabled on the system.

License

Notifications You must be signed in to change notification settings

UCLALibrary/uclalib_role_rhel7repos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ARCHIVED

This repository has been marked archived. Please see the uclalib_role_rhel8repos fork.

uclalib_role_rhel7repos

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:

  1. Defining variables for Organization ID and Activation Key
  2. 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

Requirements

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:

If you choose to use the Pool ID method:

Role Variables

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 the yum.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 the exclude_list is empty then any defined exclusions will be removed.

Dependencies

None.

Example Playbook

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 }

About

Ansible role to ensure the base set of RHEL7 yum repositories are enabled on the system.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •