{"id":15240467,"url":"https://github.com/waveclaw/puppet-subscription_manager","last_synced_at":"2025-10-05T03:30:51.139Z","repository":{"id":2512488,"uuid":"41344079","full_name":"waveclaw/puppet-subscription_manager","owner":"waveclaw","description":"Handle Client Registration to RedHat Satellite 6 or Katello","archived":false,"fork":true,"pushed_at":"2024-10-17T01:18:26.000Z","size":663,"stargazers_count":6,"open_issues_count":9,"forks_count":34,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-17T03:28:00.822Z","etag":null,"topics":["centos","katello","linux","puppet","redhat","rspec","ruby","satellite6"],"latest_commit_sha":null,"homepage":"https://rhn.redhat.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jlaska/puppet-subscription_manager","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waveclaw.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-08-25T05:08:05.000Z","updated_at":"2024-10-17T01:18:02.000Z","dependencies_parsed_at":"2023-07-05T19:49:34.980Z","dependency_job_id":null,"html_url":"https://github.com/waveclaw/puppet-subscription_manager","commit_stats":{"total_commits":447,"total_committers":34,"mean_commits":"13.147058823529411","dds":"0.18344519015659955","last_synced_commit":"a8bddf22d45de457acf47743ab58120e507b82b8"},"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waveclaw%2Fpuppet-subscription_manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waveclaw%2Fpuppet-subscription_manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waveclaw%2Fpuppet-subscription_manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waveclaw%2Fpuppet-subscription_manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waveclaw","download_url":"https://codeload.github.com/waveclaw/puppet-subscription_manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235356202,"owners_count":18976819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["centos","katello","linux","puppet","redhat","rspec","ruby","satellite6"],"created_at":"2024-09-29T11:05:08.428Z","updated_at":"2025-10-05T03:30:50.567Z","avatar_url":"https://github.com/waveclaw.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Puppet-Subscription\\_manager\n\n [![Build Status](https://travis-ci.org/waveclaw/puppet-subscription_manager.svg?branch=master)](https://travis-ci.org/waveclaw/puppet-subscription_manager) [![Code Climate](https://codeclimate.com/github/waveclaw/puppet-subscription_manager/badges/gpa.svg)](https://codeclimate.com/github/waveclaw/puppet-subscription_manager)  [![Test Coverage](https://codeclimate.com/github/waveclaw/puppet-subscription_manager/badges/coverage.svg)](https://codeclimate.com/github/waveclaw/puppet-subscription\\_manager/coverage)\n\nThis module provides Custom Puppet Provider to handle registration and\nconsumption of RedHat subscriptions using subscription-manager as part of Katello\nor RedHat Satellite 6.\n\n\u003e This module can be used with RedHat Subscription Access Manager (SAM) but is\n\u003e not primarily designed to inter-operate with SAM separate from a Katello or\n\u003e Satellite service.\n\u003e\n\u003e You cannot use this module to switch between SAM and other products or\n\u003e to SAM from a different product because of the changes in the internal name\n\u003e for the CA certificates.\n\u003e\n\nThis module is a fork of the [puppet-subscription_manager](https://github.com/jlaska/puppet-subscription_manager)\nmodule by James Laska that was in turn derived from [puppet-rhnreg_ks module](https://github.com/strider/puppet-rhnreg_ks)\n by Gaël Chamoulaud.  This fork provides an incompatible dedicated rhsm\\_config\n resource and separates repository management from control of the Yum overrides.\n\n## Notices\n\n### RHN\n\nThis module is not for direct use with RedHat Network.  For that, either use the\nprovided resource types directly or see the Ansible playbooks available directly\nfrom RedHat.  If you really want to talk to RHN directly, see the\n`subscription_manager::ca_package` parameter for how.\n\n### Services\n\nSince Satellite version 6.5, the goferd package has been deprecated.  It is not\navailable in current version of satellite. To use this module beyond version 5.6\nwith a older Satellite installation, you may want to include the service in your\nown Puppet code.  An example is provided for the `rhsmcertd` case bellow.\n\nIn Satellite 6.5.x and later, the remote command execution replaces this feature.\nThis uses the ssh service as the remove agent and does require configuration of\nboth the user and ssh configuration.  This is a topic well discussed [elsewhere](https://www.ssh.org).\n\nIn Satellite 6.10.x and later, there is a 'Run Puppet Once' job.  This uses the\nRemote Execution feature, typically SSH as a special user plus sudo to root.\n\n### Terminology\n\nDue to various terminology differences between RHN Satellite, the upstream\nKatello project and the further upstream component projects of Candlepin, The\nForeman, Puppet and Dogtag the names of properties and resources may be\nconfusing.\n* Katello Pools and Satellite Subscriptions are different things presented\n  through the same underlying system resources.  This module calls both 'pools.'\n* Satellite, unlike Katello, will require attachment to subscriptions\n  whenever paid-for RedHat Network Channels are made available through a\n  repository view.   This module does not manage those certificates.\n* If you are using Simple Content Access to manage your RedHat subscriptions, most\n  of the attachment process will just be ignored.  You are managing your licenses\n  elsewhere so should not rely upon information from this module to track those.\n  Under Simple Content Access, this module will continue to use pools but they\n  really don't matter to you or your licensing scheme.\n* RedHat SAM is an install-able RedHat supported version of the Candlepin service\n  which uses \"candlepin-cert-consumer-\" package name instead of of the package\n  name \"katello-ca-consumer-\".  Options are provided to select which you want.\n\n## License\n\nApache License, Version 2.0. Read the LICENSE file for details of the licensing.\n\n## Requirements\n* [waveclaw-facter_cacheable](https://forge.puppet.com/waveclaw/facter_cacheable)\n* [puppetlabs-transition](https://forge.puppet.com/puppetlabs/transition) [on GitHub](https://github.com/puppetlabs/puppetlabs-transition)\n* A good source for subscription-manager and its dependencies like [EPEL](http://repos.fedorapeople.org/repos/candlepin/subscription-manager/epel-subscription-manager.repo).\n* [python-syspurpose](https://ftp.riken.jp/Linux/cern/centos/7.4.1708/updates/x86_64/repoview/python-syspurpose.html) or python3-syspurpose for _optional_ reporting of system purpose text.\n\n## Authors\n\nSee CONTRIBUTORS.\n\n## Classes and Defines\n\nThis module provides the standard install-config-service pattern. It also wraps\nthe provided native resources with a convenience class to enable simple or complex\ndeployment.\n\nIt is expected that any users not making use of default top-level import of the\nmodule will be interested in the native types for customization.\n\n#### Facts\n\nSome custom facts are provided.\n\nA family of facts, similar to the rhsm\\_repo type, summarize the subscription\nstate. See [Terminology](#Terminology) for caveats. These can return lists.\n\nSummary of Repository state\n* rhsm\\_available\\_repos\n* rhsm\\_disabled\\_repos\n* rhsm\\_enabled\\_repos\n\nSummary of licensing state\n* rhsm\\_available\\_pools\n* rhsm\\_disabled\\_pools\n* rhsm\\_enabled\\_pools\n\nGeneric information about the subscription to Satellite\n* rhsm\\_environment\n* rhsm\\_syspurpose (optional)\n\n##### Notes on caching\n\nThe repo facts make use of a simple caching mechanism using the facts.d\ndirectory to limit connections to the Katello or Satellite server.  Like the\nkatello-agent these only pull data once a day.\n\nThe once-per day schedule is currently a hard-coded value. However the cache can\nbe invalidated by finding and removing the cache files.\n\nThe cache files should appear as normal YAML format external fact files. These\nfacts may actually linger on after removing the rhsm module itself.  Beware that\nthe location of external fact files is different between Puppet and facter for\nolder versions of Puppet like 2 or 3 and facter 1.x.\n\n##### Advanced SSL/TLS\n\nThe certificate authority is part of the rhsm_config type but is very useful for\noperations in involving subscription management.  This differs slightly between\nKatelo, RedHat Satellte and RedHat SAM.\n* rhsm\\_ca\\_name\n\nOf course, a fact exists about the identity of the client as known locally.\n* rhsm\\_identity\n\n## Examples\n\nSetup to and register one CentOS 6 client to a Katello server using a public\nrepository to obtain the agent.\n\n```puppet\n# (Optionally) Place this code in a .pp file some where on your Puppet's modulepath\n# such as a file named subscription_manager.pp in a module named repo.\n# The autoloader will be triggered by the rhsm module to search for this class.\nclass repo::subscription_manager {\n  yumrepo { 'dgoodwin-subscription-manager':\n  ensure              =\u003e 'present',\n  baseurl             =\u003e 'https://copr-be.cloud.fedoraproject.org/results/dgoodwin/subscription-manager/epel-6-$basearch/',\n  descr               =\u003e 'Copr repo for subscription-manager owned by dgoodwin',\n  enabled             =\u003e '1',\n  gpgcheck            =\u003e '1',\n  gpgkey              =\u003e  'https://copr-be.cloud.fedoraproject.org/results/dgoodwin/subscription-manager/pubkey.gpg',\n    skip_if_unavailable =\u003e 'True',\n  }\n}\n\n# Place this this in either a raw .pp manifest, a profile-like module or\n# classify the node to require subscription_manager with these parameters in\n# your ENC.\n# Notice the explict call for the optional package repository to include.\nclass { 'subscription_manager':\n    repo            =\u003e 'repo::subscription_manager',\n    server_hostname =\u003e 'my_katello.example.com',\n    activationkey   =\u003e '1-2-3-example.com-key',\n    force           =\u003e true,\n    org             =\u003e 'My_Example_Org',\n  }\n}\n```\n\nRegister a RedHat Enterprise 7 or CentOS 7 node to the RedHat Network with\nSatellite 6 using a password and username.\n\n\u003e Note that you have to stop managing the `ca\\_package` as you get that from RedHat\n\u003e as part of the OS installation.\n\n```puppet\nclass { 'subscription_manager':\n   org           =\u003e 'My_Company_Org_in_RHN',\n   username      =\u003e 'some_rhn_special_user',\n   password      =\u003e 'password123',\n   autosubscribe =\u003e true,\n   servicelevel  =\u003e 'STANDARD',\n   ca_package    =\u003e false,\n}\n\nPutting the explicit password in the code is a *bad* idea. Using hiera-gpg or\nhiera-eyaml back-ends is strongly encouraged for this example.\n\n```\nRegister a RedHat Enterprise 7 or CentOS 7 node to Satellite 6 using an activation key.\n\n```puppet\n  class { 'subscription_manager':\n     server_hostname =\u003e 'satellite.example.com',\n     org             =\u003e 'My_Company_Org',\n     activationkey   =\u003e '1234-key',\n     autosubscribe   =\u003e true,\n     servicelevel    =\u003e 'STANDARD',\n     config_hash     =\u003e {\n       server_prefix          =\u003e '/rhsm',\n       rhsm_baseurl           =\u003e \"https://satellite.example.com/pulp/repos\",\n       rhsm_repo_ca_cert      =\u003e '%(ca_cert_dir)s/katello-server-ca.pem',\n     },\n     service_name    =\u003e'rhsmcertd',\n     force           =\u003e true,\n  }\n```\n\u003e Notice that the `rhsm_repo_ca_cert` must change to match the certificate provided\n\u003e by the katello-ca-consumer package on the Satellite server.  This can be\n\u003e contained in the files searched by the `rhsm_ca_cert` fact. These are SSL\n\u003e certificates which do not take into account Subject Alternative Names. Only\n\u003e the primary name in the certificate is used to check if the client is\n\u003e registered to the correct server.\n\n\nRegister to a local RedHat SAM server.  Note that rhsmcertd and goferd are\noptional.  You will have to perform the serivice management at the top level\nof your puppet code.\n\n```puppet\n  class { 'subscription_manager':\n     server_hostname   =\u003e 'sam.example.com',\n     org               =\u003e 'My_Company_Org',\n     activationkey     =\u003e '1234-key',\n     ca_package_prefix =\u003e 'candlepin-cert-consumer-', # note the trailing hypen\n     autosubscribe     =\u003e true,\n     servicelevel      =\u003e 'PREMIUM',\n     config_hash       =\u003e {\n       rhsm_repo_ca_cert      =\u003e '/etc/rhsm/ca/candlepin-local.pem',\n     },\n     service_name      =\u003e'rhsmcertd',\n     force             =\u003e true,\n  } ~\u003e Service ['rhsmcertd']\n```\n\n\u003e For this example one can see that the `config_hash` only needs customized entries\n\u003e so there is no need to provide every default.\n\n## Types and Providers\n\nThe module adds the following new types:\n\n* `rhsm_register` for managing RedHat Subscriptions\n* `rhsm_config`   for configurating RedHat Subscriptions\n* `rhsm_repo`     for managing RedHat Subscriptions to Repositories\n* `rhsm_override` for managing the Subscrption yumrepo override cache\n* `rhsm_pool`     for managing RedHat Entitlement Pools (Satellite Subscription Collections)\n\n### rhsm_register\n\n#### Parameters\n\n##### Mandatory\n\n- **server_hostname**: Specify a registration server hostname such as subscription.rhn.redhat.com.\n- **org**: provide an organization to join (defaults to the Default_Organization).  In the commerical Satellite 6 product's user interface this can be set to a template value such as  `\u003c%= @host.rhsm_organization_label %\u003e`\n\nEither an activation key or a username and password combination is needed to\nregister.  Both cannot be provided and will cause an error.\n\n- **activationkey**: The activation key to use when registering the system (cannot be used with username and password).  In the commerical Satellite 6 product's user interface this can be set to a template value such as `\u003c%= @host.params['kt_activation_keys'] %\u003e`\n- **password**: The password to use when registering the system\n- **username**: The username to use when registering the system\n\n##### Optional\n\n- **pool**: A specific license pool to attach the system to. Can include a default view using the formant pool-name/view-name.\n- **lifecycleenv**: which lifecycle environment to join at registration time (incompatible with using activation keys)\n- **autosubscribe**: Enable automatic subscription to repositories based on default Pool settings. Must be false when using an activation key unless specifying a service level.\n- **servicelevel**: provide automatic attachment to a service level in Satellite. Not applicable to katello installations.\n- **release**: The release command sets a sticky OS version to use when installing or updating packages. This sets a preference for the minor version of the OS, such as 6.2 or 6.3. This can prevent unplanned or unsupported operating system version upgrades when an IT environment must maintain a certified configuration.  \n- **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`.\n\n### rhsm_register Examples\n\nRegister clients to RedHat Subscription Management using an activation key:\n\n```puppet\nrhsm_register { 'satellite.example.com':\n  server_hostname =\u003e 'satellite.example.com',\n  activationkey   =\u003e '1-myactivationkey',\n}\n```\n\nRegister clients to RedHat Subscription management using a username and password:\n\n```puppet\nrhsm_register { 'subscription.rhn.example.com':\n  username        =\u003e 'myusername',\n  password        =\u003e 'mypassword',\n  autosubscribe   =\u003e true,\n  force           =\u003e true,\n}\n```\n\nRegister clients to RedHat Subscription management and attach to a specific license pool:\n\n```puppet\nrhsm_register { 'subscription.rhn.example.com':\n  username  =\u003e 'myusername',\n  password  =\u003e 'mypassword',\n  pool      =\u003e 'mypoolid',\n}\n```\n\n### rhsm_config\n\nPlease see man(5) RHSM.CONF for your locally supported options.  There are quite\n a few and they require specific inputs.\n\nrhsm_config cannot set values that are not available from the `subscription-manager config` sub-command.\n\nFor the rhsm.conf options that are not supported directly, it is recommended to use either the puppetlabs-stdlib `file_line` or one of the many forge.puppet.com modules for managing ini-format files.\n\n##### rhsm_config options\n\nSee the documentation at [RedHat Support](https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/rhsm-config.html#tab.rhsm.conf-parameters) for RedHat provided details on the `/etc/rhsm/rhsm.conf` file.\n\nThe most important settings are as follows.  Specific support is made for them.\n\n- **server_hostname**: Same as the title or name of the resource.  In the commerical Satellite 6 product's user interface this can be set to a template value such as `\u003c%= @host.content_source.hostname %\u003e`\n- **server_insecure**: If HTTP is used or HTTPS with an untrusted certificate\n- **server_prefix**: The subscription path.  Usually `/subscription` for RHN and `/rhsm` for a Katello installation.\n- **rhsm_baseurl**: The Content base URL in case the registration server has no content. An example would be [https://cdn.redhat.com](https://cdn.redhat.com) or [https://katello.example.com/pulp/repos](https://katello.example.com/pulp/repos)\n\n\u003e rhsmcertd is not the same as Katello's goferd.\n\nOther options can be rolled into a configuration hash and fed to the module as a\nwhole. See init.pp and the following YAML example for details.\n\nDo know the supported options to the specific version of `subscription-manager config --help` on your platform.\n\n***Options that are not supported will be ignored!***\n\n##### rhsm_config Examples\n\nAs a resource, the format of `[section]` and `section.key` is transformed into the puppet language compatible `section_key`.\n\n```puppet\nrhsm_config { 'katello.example.com':\n    server_hostname              =\u003e 'katello.example.com',\n    server_insecure              =\u003e false,\n    server_port                  =\u003e 443,\n    server_prefix                =\u003e '/rhsm',\n    server_ssl_verify_depth      =\u003e 3,\n    rhsm_baseurl                 =\u003e 'https://katello.example.com/pulp/repos',\n    rhsm_ca_cert_dir             =\u003e '/etc/rhsm/ca/',Code without any tests will be rejected.\n    rhsm_consumercertdir         =\u003e '/etc/pki/consumer',\n    rhsm_entitlementcertdir      =\u003e '/etc/pki/entitlement',\n    rhsm_full_refresh_on_yum     =\u003e true,\n    rhsm_manage_repos            =\u003e true,\n    rhsm_pluginconfdir           =\u003e '/etc/rhsm/pluginconf_d',\n    rhsm_plugindir               =\u003e '/usr/share/rhsm-plugins',\n    rhsm_productcertdir          =\u003e '/etc/pki/product',\n    rhsm_repo_ca_cert            =\u003e '/etc/rhsm/ca/katello-server-ca.pem',\n    rhsm_report_package_profile  =\u003e 1,\n    rhsmcertd_autoattachinterval =\u003e 1440,\n    server_proxy_hostname        =\u003e 'proxy.example.com',\n    server_proxy_user            =\u003e 'proxy_user',\n    server_proxy_password        =\u003e 'proxy_password',\n    server_proxy_port            =\u003e 4443,    \n}\n```\n\nAs a hiera data source.\n\n```yaml\n---\nsubscription_manager::config_hash:\n server_hostname: 'katello.example.com'\n server_insecure:  false\n server_prefix:  '/rhsm'\n server_port:  443\n server_ssl_verify_depth:  3\n rhsm_baseurl:  'https://katello.example.com/pulp/repos'\n rhsm_ca_cert_dir:  '/etc/rhsm/ca'\n rhsm_repo_ca_cert:  '%(ca_cert_dir)s/katello-server-ca.pem'\n rhsm_productcertdir:  '/etc/pki/product'\n rhsm_entitlementcertdir:  '/etc/pki/entitlement'\n rhsm_consumercertdir:  '/etc/pki/consumer'\n rhsm_manage_repos:  true\n rhsmcertd_certcheckinterval:  240\n rhsmcertd_autoattachinterval:  1440\n\n```\n\nUsers should only need to provide the settings in `config_hash` _that differ_\nfrom any of the defaults which are used in the module.\n\nIf you are using the resource you will have to provide everything you want to set.\n\n\u003e Note: un-setting a required default by providing a blank option will make the\n\u003e subscription stop working.\n\nThe `default_log_level` and basic *module_name* logging settings are available.\nNone of the sub-modules are available.  A suggestion for those would be to ship\ncustomized file-line resources to not conflict with changes created through the\n`subscription-manager` command.\n\n### rhsm\\_repo\n\n#### rhsm\\_repo Parameters\n\nIf absolutely necessary the individual yum repositories can be filtered.\n\n\u003e This cannot add new repositories, only filter existing subscribed repositories.\n\u003e If you require more repositories, edit your Content View(s) or Pool(s).\n\u003e Or just use the `yumrepo` native type that ships with Puppet.\n\n- **ensure**: Valid values are `present`, `absent`. Default value is `present`.\n- **name**: The name of the repository registration to filter.\n\n\n#### rhsm\\_repo Examples\n\nExample of a repository from the Server\n\n```puppet\nrhsm_repo { 'rhel-6-server-java-rpms':\n  ensure        =\u003e present, # equal to the enabled property\n  url           =\u003e 'https://katello.example.com/pulp/repos/abc-corp/production/reg-key-1/content/dist/rhel/server/6/6Server/$basearch/java-repo/os',\n  content_label =\u003e 'rhel-6-java-rpms',\n  id            =\u003e 'rhel-6-java-rpms',\n  name          =\u003e 'RedHat Enterprise Linux 6 Server - Java (RPMs)',\n  repo_type     =\u003e channel,\n}\n```\n\n### rhsm\\_override\n\n## rhsm\\_override Example\n\nThis is returned by the Puppet resource command but it not manageable in a\nmeaningful way through the type.\n\n```puppet\nrhsm_repo { 'rhel-server6-epel':\n  ensure        =\u003e present, # equal to the enabled property\n  updated       =\u003e 2015-07-17T14:26:35.064+0000,\n  created       =\u003e 2015-07-17T14:26:35.064+0000,\n  content_label =\u003e 'rhel-server6-epel'\n  repo_type     =\u003e override,\n}\n```\n\n### rhsm\\_pool\n\nSubscriptions to use RHN are sold as either individual entitlements or a pools of\nentitlements.  A given server registered to a Satellite 6 or Katello system will\nconsume at least 1 entitlement from a Pool.\n\nThis subscription to the Pool is what enables the set of repositories to be made\navailable on the server for further subscription.\n\nWhile this type is mostly useful for exporting the registration information in detail\nit can also be used to force switch registrations for selected clients.\n\n### rhsm\\_pool Parameters\n- **subscription\\_name**: Unique Textual description of the Pool\n- **ensure**: Is this pool absent or present?\n- **provides**: Textual information about the Pool, usually same as the name.\n- **sku**: Stock Keeping Unit, usually for inventory tracking\n- **account**: Account number for this Pool of Subscriptions\n- **contract**: Contract details, if known\n- **serial**: Any serial number that is associated with the pool\n- **id**: ID Hash of the Pool\n- **active**: Is this subscription in use at the moment?\n- **quantity\\_used**: How many is used?  Often licenses are sold by CPU or core so\nis it possible for a single server to consume several subscriptions.\n- **service\\_type**: type of service, usually relevant to official RedHat Channels\n- **service\\_level**: level of service such as STANDARD, PREMIUM or SELF-SUPPORT\n- **status_details**: Status detail string\n- **subscription\\_type**: Subscription - type\n- **starts**: Earliest date and time the subscription is valid for\n- **ends**: When does this subscription expire\n- **system\\_type**: Is this a physical, container or virtual system?\n\n### rhsm\\_pool Example\n\n```puppet\nrhsm_pool { '1a2b3c4d5e6f1234567890abcdef12345':\n  subscription_name =\u003e 'Extra Packages for Enterprise Linux',\n  ensure            =\u003e present,\n  provides          =\u003e 'EPEL',\n  sku               =\u003e 1234536789012,\n  contract          =\u003e 'Fancy Widgets, LTD',\n  account           =\u003e '1234-12-3456-0001',\n  serial            =\u003e 1234567890123456789,\n  id                =\u003e 1a2b3c4d5e6f1234567890abcdef12345,\n  active            =\u003e true,\n  quantity_used     =\u003e 1,\n  service_level     =\u003e 'STANDARD',\n  service_type      =\u003e 'EOL',\n  status_details    =\u003e 'expired',\n  subscription_type =\u003e 'permanent',\n  starts            =\u003e 06/01/2015,\n  ends              =\u003e 05/24/2045,\n  system_type       =\u003e physical,\n}\n```\nNote of caution:\n* A \"name\" parameter may get created by Puppet's resource abstraction API for\nPools.\n* The \"name\" parameter is an alias for the ID value. So this must match the field\n`id` in value.\n* The name of a Pool should always match the `id`.  That is used for managing\nthe pool.  The human-friendly \"name\" is ignored.\n\n## Installing\n\n### Release Version\n\nFor released version the module can be installed with the Puppet module tool\nfrom the Puppet Forge.  Or even added as a Puppetfile source with Puppet\nEnterprise or r10k or Puppet Librarian.\n\n```\n  puppet module install waveclaw-subscription_manager\n```\nThis will install *waveclaw-facter_cacheable* and *puppetlabs-transition* as dependencies.\n\nNote that *facter_cacheable*, while optional, is highly recommended to reduce\nload on your Foreman or Katello server.\n\n### Development Version\n\nFor pre-release code the GitHub repository can be cloned.\n\nIn your puppet modules directory:\n\nFor the original module:\n```\n    git clone https://github.com/jlaska/puppet-subscription_manager.git\n```\n\nFor this module:\n```\n    git clone https://github.com/waveclaw/puppet-subscription_manager.git\n```\n\nEnsure the module is present in your puppetmaster's own environment.  The Puppet\nMaster node doesn't have to use the module or Satellite itself. Ensure that the\ntarget node to register has pluginsync enabled.  Run the agent on the target node\nto cause the custom types to be synced to the local libdir\n(`puppet master --configprint libdir`).\n\nIf you use the [Puppet Development Kit](https://www.puppet.com/docs/pdk/latest/pdk_install.html), this module is PDK 3.0+ compatible.\n\n### Deprecation Warnings\n\nSupport for Ruby 1.8.7 and older is ad-hoc at best. Modern `rake` and\n`json_pure` require newer releases.\n\nThe caching functions were pushed to a difference module on the forge,\n`waveclaw-facter_cachable`. Some of the tests do not run properly under\nTravis CI.  These are commended out in the code but can be run locally.\n\n### Acceptance Tests\n\nAcceptance tests require a working katello system, RedHat Satellite server or\njust a repo of pre-built dependent packages.\n\nCustomization of the `spec/spec_acceptance_helper.rb` and specific tests is needed to\npoint the full tests at working servers.  Otherwise some of the tests must fail.\n\n## Issues\n\nPlease file any issues or suggestions on [on GitHub](https://github.com/waveclaw/puppet-subscription_manager/issues)\n\nSuggestions without code may be ignored. Code without any tests _will_ be rejected.\n\n### Guidelines\n\nPlease follow the example42 development guidelines.\n\nPull requests and bug reports via GitHub are welcomed.\n\nFor Pull Requests please:\n\n* puppet-lint code (yes, some of the community standards are inane)\n* provide rSpec tests if possible: code that sets tests on fire won't be merged\n* Follow the module style naming standards\n* Add your name to CONTRIBUTORS if you are new\n\nFor a bug report please include or link as much as you can:\n\n* Code that triggers the error\n* Output of ```facter -p``` from the system where the error occurs\n* _Relevant_ error logs (e.g. from RHSM parts or `subscription-manager` output)\n* Of course, the basic 'how to ask a good question' information.\n- What did you do (terminal session logs, etc)?\n- What was expected?\n- What actually happened?\n- When did it start happening?\n- Is it _still_ happening?\n- Does it happen all the time or randomly?\n* Any other information needed to understand the error\n\nNone of this guarantees a solution. At the least a good bug report can warn others.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaveclaw%2Fpuppet-subscription_manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaveclaw%2Fpuppet-subscription_manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaveclaw%2Fpuppet-subscription_manager/lists"}