This module provides Custom Puppet Provider to handle registration and consumption of Red Hat subscriptions using subscription-manager. Note, I am a puppet novice. This module was created by extensively borrowing from Gaël Chamoulaud's puppet-rhnreg_ks module.
Read Licence file for more information.
- puppet-boolean on GitHub
- Gaël Chamoulaud (gchamoul at redhat dot com)
- James Laska (jlaska at redhat dot com)
The module adds the following new types:
rhsm_register
for managing Red Hat Subscriptionsrhsm_repo
for managing Red Hat Repository Subscriptions
- activationkeys: The activation key to use when registering the system (cannot be used with username and password)
- ensure: Valid values are
present
,absent
. Default value ispresent
. - force: Should the registration be forced. Use this option with caution, setting it true will cause the system to be unregistered before running 'subscription-manager register'. Default value
false
. - hardware: Whether or not the hardware information should be probed. Default value is
true
. - password: The password to use when registering the system
- server_hostname: Specify a url to use as a server
- username: The username to use when registering the system
- pool: A specific license pool to attach the system to
Register clients to Red Hat Subscription Management using an activation key:
rhsm_register { 'satelite.example.com': server_hostname => 'my-satelite.example.com', activationkeys => '1-myactivationkey', }
Register clients to Red Hat Subscription management using a username and password:
rhsm_register { 'subscription.rhn.example.com': username => 'myusername', password => 'mypassword', autosubscribe => true, force => true, }
Register clients to Red Hat Subscription management and attach to a specific license pool:
rhsm_register { 'subscription.rhn.example.com': username => 'myusername', password => 'mypassword', pool => 'mypoolid', }
- ensure: Valid values are
present
,absent
. Default value ispresent
. - name: The name of the repo registration to add
Add a repo:
rhsm_repo { 'rhel-7-server-optional-rpms': }
Remove a repo:
rhsm_repo { 'rhel-7-server-optional-rpms': ensure => 'absent', }
In your puppet modules directory:
git clone https://github.com/strider/puppet-subscription_manager.git
Ensure the module is present in your puppetmaster's own environment (it doesn't
have to use it) and that the master has pluginsync enabled. Run the agent on
the puppetmaster to cause the custom types to be synced to its local libdir
(puppet master --configprint libdir
) and then restart the puppetmaster so it
loads them.
Please file any issues or suggestions on on GitHub