Forge Home

rhsm

Puppet module for managing Red Hat subscriptions

12,507 downloads

9,121 latest version

2.8 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.2.0 (latest)
  • 0.0.2
  • 0.0.1
released May 25th 2016
This version is compatible with:

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'crayfishx-rhsm', '0.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add crayfishx-rhsm
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install crayfishx-rhsm --version 0.2.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

crayfishx/rhsm — version 0.2.0 May 25th 2016

rhsm

Description

A puppet module to manage Redhat subscriptions using the subscription-manager

Module Description

This module provides the rh_subscription type that can be used to add and remove subscriptions

Types

rh_repo

Manage yum repos via the subscription manager

rh_subscription

Enable or disable RH subscriptions based on their pool ID

rhsm::named_subscription

Manage rh_subscription resources using a hash to map human readable names to pool ID's

Usage

Use Puppet to add a repo using subscription manager

rh_repo { 'rhel-7-server-extras-rpms':
 ensure => present,
}

Use Puppet to add or remove a subscription based on it's pool ID

rh_subscription { '8e8e7f7a77554a776277ac6dca654':
  ensure => present,
}

Hiera

The rhsm class also provides a helper using create_resources() to configure any subscriptions or repos in hiera

---
rhsm::subscriptions:
  8e8e7f7a77554a776277ac6dca654: {}
  8e8e7f7a77554a776277e63d13ca4: {}

rhsm::repos:
  rhel-7-server-optional-rpms: {}

Puppet will automatically configure these subscriptions when the rhsm class is declared.

class { '::rhsm': }

The module also provides a way to store pool IDs with corresponding readable names and refer to those in your manifests

---
rhsm::pool_names:
  rhel_extras:  8e8e7f7a77554a776277ac6dca654
  oracle_stuff: 8e8e7f7a77554a776277e63d13ca4

You can then declare these subscriptions from hiera....

---
rhsm::named_subscriptions:
  rhel_extras: {}
  oracle_stuff: {}

Or use the rhsm::named_subscription defined resource type directly

class { '::rhsm': }

rhsm::named_subscription { 'oracle_stuff':
  ensure => present,
}

Credits