Puppet Class: subscription_manager

Defined in:
manifests/init.pp

Overview

Class: subscription_manager

Setup to and register a Katello or RHN Satellite 6 client

Parameters


  • ‘package_names` Name of packages to install. Defaults to subscrition-manager to get minimal client support working.

  • ‘ca_package_prefix` Override the prefix of the package name for CA consumer. This is needed to inegrate with RedHat Subscription Access Manager (SAM) and is otherwise set to a default of katello-ca-consumer-, (Please note the hyphen.)

  • ‘service_name` Name of the services to run or disable. Defaults to the goferd, the Katello orchestration daemon.

  • ‘service_status` Status of the services. Defaults to running.

  • ‘server_hostname` The name of the server to register this agent to.

  • ‘username` The username for registration to a server. Conflicts with activationkey.

  • ‘password` The password for the username for registration. Conflicts with activationkey.

  • ‘activationkey` An activation key to use for registration of the agent to the server. Conflicts with the username and password registration method.

  • ‘release` The release command sets a sticky OS version to use when installing or updating packages.

  • ‘pool` A subscription pool or RedHat Entitlement to associate with this system.

  • ‘lifecycleenv` Originally called `environment`, this setting continues to refer to the Lifecycle Environment of a Content View such as library, development, test, et cetera as setup within the server. Typically this would be handled by the activation key and conflicts with using a key to register.

  • ‘autosubscribe` Should the option be provided to automatically subscribe all potentially valid repositories offered by the server.

  • ‘servicelevel` Applies to agents of a Satellite system with a valid RedHat Subscription. Enables override of the default service level associated with an activation key or control of this setting when using username and password registration. Usually handled automatically by the activation key.

  • ‘force`

    If the registration should be attempted with the `--force` option to enabled
    re-subscription of potentially valid agents.  Useful in the case of mass
    subscription repair or bootstrapping. Otherwise a nuisance to a working
    service.
    
  • ‘org` Organization to subscribe the system to. Required for registration.

  • ‘repo`

Optional repo class that will be invoked by the install step
as a dependency for every package to install.

Use this if the required packages don't exist in a default repo.
  • ‘config_hash` All the various possible settings to override such as server_proxy_hostname See the /data/defaults.yaml for an example of the default settings.

Variables


  • ‘::facts[’family’]‘ Reject unsupported platforms

  • ‘::facts[’description’]‘ Label for a rejected plaform to use when notifying about rejection

Authors


  • Gaël Chamoulaud <gchamoul@redhat.com>

  • JD Powell <waveclaw@waveclaw.net>

Copyright


Copyright 2015 Gaël Chamoulaud <gchamoul@redhat.com>

Examples:


class { subscription_manager:
   activationkey = 'my-rhn-key',
}

Parameters:

  • package_names (Array[String]) (defaults to: ['subscription-manager'])

    packages to install

  • ca_package_prefix (String) (defaults to: 'katello-ca-consumer-')

    prefix for the certname of the CA consumer

  • service_name (String) (defaults to: 'goferd')

    services to manage

  • service_status (Enum['running','stopped', 'disabled', 'enabled']) (defaults to: 'running')

    what status to apply to managed services?

  • server_hostname (String) (defaults to: 'subscription.rhn.redhat.com')

    which server to register with?

  • username (String) (defaults to: '')

    which username for registration?

  • password (String) (defaults to: '')

    which password for registration?

  • activationkey (String) (defaults to: '')

    an activation key for registering to a server

  • release (Optional[String]) (defaults to: undef)

    pin a certain release when registering a server

  • pool (String) (defaults to: '')

    a pool or RedHat Entitlement to automatically use

  • lifecycleenv (String) (defaults to: 'library')

    the environment of a content view

  • autosubscribe (Variant[String, Boolean, Enum['yes','no']]) (defaults to: false)

    automatically subscribe to repositories?

  • servicelevel (Optional[String]) (defaults to: 'Standard')

    Override the service level during subscription

  • force (Variant[String, Boolean, Enum['yes','no']]) (defaults to: false)

    Should the registration be forced?

  • org (String) (defaults to: 'Default_Organization')

    Which organization to subscribe to?

  • repo (Variant[String, Class]) (defaults to: '')

    replacement repository as a source of packages

  • config_hash (Hash) (defaults to: {})
  • ca_package (Boolean) (defaults to: true)


122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'manifests/init.pp', line 122

class subscription_manager (
  Array[String] $package_names = ['subscription-manager'],
  Boolean $ca_package = true,
  String $ca_package_prefix = 'katello-ca-consumer-',
  String $service_name = 'goferd',
  Enum['running','stopped', 'disabled', 'enabled'] $service_status = 'running',
  String $server_hostname = 'subscription.rhn.redhat.com',
  String $username = '',
  String $password = '',
  String $activationkey = '',
  String $pool = '',
  String $lifecycleenv = 'library',
  Variant[String, Boolean, Enum['yes','no']] $autosubscribe = false,
  Variant[String, Boolean, Enum['yes','no']] $force = false,
  String $org = 'Default_Organization',
  Variant[String, Class] $repo = '',
  Hash $config_hash = {},
  Optional[String] $servicelevel = 'Standard',
  Optional[String] $release = undef,
) {

  # limit use to supported Operating Systems
  case $::facts['os']['family'] {
    'RedHat', 'CentOS', 'Scientific', 'Fedora': {
      class { '::subscription_manager::install': }
      -> class { '::subscription_manager::config': }
      -> Class['::subscription_manager']
    }
    default: {
      notify { "${::facts['os']['description']} not supported by subscription_manager": }
    }
  }
  # The goferd service was discontinued in Satellite 6.5
  # users can require this class manually
  #       ~> class { '::subscription_manager::service': }
}