Forge Home


Register with the RedHat Subscription Management


1,445 latest version

4.7 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

  • 5.2.0 (latest)
  • 5.1.0
  • 5.0.0
  • 4.1.0
  • 4.0.0
  • 3.2.0
  • 3.1.0
  • 3.0.0
  • 2.1.1
  • 2.1.0
  • 2.0.0
  • 1.1.0
  • 1.0.0
  • 0.3.0
released Dec 19th 2023
This version is compatible with:
  • Puppet Enterprise 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0

Start using this module

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

Add this module to your Puppetfile:

mod 'puppet-rhsm', '5.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

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

Manually install this module globally with Puppet module tool:

puppet module install puppet-rhsm --version 5.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.



puppet/rhsm — version 5.2.0 Dec 19th 2023


Build Status Release Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores docs Apache-2.0 License

Table of Contents

  1. Description
  2. Setup
  3. Types
  4. Usage
  5. Limitations
  6. Development


This module registers your systems with Red Hat Subscription Management.


Just declare the module with parameters, or load the data from Hiera.



Manage yum repos via the subscription-manager.


Enable or disable RH subscriptions based on their pool ID.


class { 'rhsm':
  rh_user     => 'myuser',
  rh_password => 'mypassword',

Use rh_repo type to add a repository:

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

Use rh_subscription type to add or remove a subscription based on its pool ID:

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

Hiera (recommended)

include rhsm


rhsm::rh_user: myuser
rhsm::rh_password: mypassword


If the RedHat node must use a proxy to access the internet, you'll have to provide at least the hostname and TCP port.

class { 'rhsm':
  proxy_hostname => '',
  proxy_port     => 8080
  rh_user        => 'myuser',
  rh_password    => 'mypassword',

If you don't specify the protocol, subscription-manager will use HTTP. If you want to connect via HTTPS, set the proxy_scheme to https. For proxies with authentication, specify the proxy_user and proxy_password values. Depending on your environment, you also migh need to set the no_proxy value.

The proxy settings will be used to register the system and as connection option for all the YUM repositories generated in /etc/yum.repos.d/redhat.repo

Enabled Repos

A string array of repo IDs can be provided as an argument to the class definition. This list will be used to enable the target repos if that has not already occurred.

The following example enables the server and optional RPMs:

class { 'rhsm':
  rh_user          => 'myuser',
  rh_password      => 'mypassword',
  enabled_repo_ids => [

Alternatively, hiera can be utilized to specify these arguments.

rhsm::rh_user: myuser
rhsm::rh_password: mypassword
  - 'rhel-7-server-rpms',
  - 'rhel-7-server-optional-rpms'

Satellite 6

Registering with Red Hat Satellite 6 needs some additional settings.

class { 'rhsm':
  activationkey         => 'act-lce-rhel-7,act-product',
  org                   => 'satellite_organization',
  servername            => '',
  serverprefix          => '/rhsm',
  repo_ca_cert_filename => 'katello-server-ca.pem',
  repo_ca_cert_source   => 'puppet:///modules/profile/katello-server-ca.crt',
  full_refresh_on_yum   => 1,
  baseurl               => '',
  • You need to specify either (rh_user and rh_password) or (org and activationkey).
  • Multiple Activationkeys might be provided, separated by comma.
  • Download the corresponding certificate from your Satellite ( and publish it, e.g. with a (profile) module.

Dnf/Yum plugin configuration

You can also configure the dnf/yum plugin via the $plugin_settings parameter.



Well, only RedHat is supported :)


Some general guidelines on PR structure can be found here.