Chapter 6. Configuring Puppet Smart Class Parameters

6.1. Puppet Parameter Hierarchy

Puppet parameters are structured hierarchically. Parameters at a lower level override parameters of the higher levels:

  1. Global parameters
  2. Organization parameters
  3. Location parameters
  4. Host group parameters
  5. Host parameters

For example, host specific parameters override the parameter at any higher level, and location parameters only override parameters at the organization or global level. This feature is especially useful when you use locations or organizations to group hosts.

6.2. Overriding a Smart Class Parameter Globally

You can configure a Puppet class after you have imported it to Satellite Server. This example overrides the default list of ntp servers.

Procedure

  1. In the Satellite web UI, navigate to Configure > Classes.
  2. Select the ntp Puppet class to change its configuration.
  3. Select the Smart Class Parameter tab and search for servers.
  4. Ensure the Override checkbox is selected.
  5. Set the Parameter Type drop down menu to array.
  6. Insert a list of ntp servers as Default Value:

    ["0.de.pool.ntp.org","1.de.pool.ntp.org","2.de.pool.ntp.org","3.de.pool.ntp.org"]

    An alternative way to describe the array is the yaml syntax:

    - 0.de.pool.ntp.org
    - 1.de.pool.ntp.org
    - 2.de.pool.ntp.org
    - 3.de.pool.ntp.org
  7. Click the Submit button after adding the values. This changes the default configuration of the Puppet module ntp.

6.3. Overriding a Smart Class Parameter for an Organization

You can use groups of hosts to override Puppet parameters for multiple hosts at once. The following example chooses the organization context to illustrate setting context based parameters.

Note that organization-level Puppet parameters are overridden by location-level Puppet parameters.

Procedure

  1. In the Satellite web UI, navigate to Configure > Classes.
  2. Click a class name to select a class.
  3. On the Smart Class Parameter tab, select a parameter.
  4. Use the Order list to define the hierarchy of the Puppet parameters. The individual host (fqdn) marks the most and the organization context (organization) the least relevant.
  5. Check Merge Overrides if you want to add all further matched parameters after finding the first match.
  6. Check Merge Default if you want to also include the default value even if there are more specific values defined.
  7. Check Avoid Duplicates if you want to create a list of unique values for the selected parameter.
  8. The matcher field requires an attribute type from the order list.
  9. Use the Add Matcher button to add more matchers.
  10. Click Submit to save the changes.

6.4. Overriding a Smart Class Parameter for a Location

You can use groups of hosts to override Puppet parameters for multiple hosts at once. The following examples chooses the location context to illustrate setting context based parameters.

Procedure

  1. In the Satellite web UI, navigate to Configure > Classes.
  2. Click a class name to select a class.
  3. On the Smart Class Parameter tab, select a parameter.
  4. Use the Order list to define the hierarchy of the Puppet parameters. The individual host (fqdn) marks the most and the location context (location) the least relevant.
  5. Check Merge Overrides if you want to add all further matched parameters after finding the first match.
  6. Check Merge Default if you want to also include the default value even if there are more specific values defined.
  7. Check Avoid Duplicates if you want to create a list of unique values for the selected parameter.
  8. The matcher field requires an attribute type from the order list. For example, you can choose Paris as location context and set the value to French ntp servers.
  9. Use the Add Matcher button to add more matchers.
  10. Click Submit to save the changes.

6.5. Overriding a Smart Class Parameter on an Individual Host

You can override parameters on individual hosts. This is recommended if you have multiple hosts and only want to make changes to a single one.

Procedure

  1. In the Satellite web UI, navigate to Hosts > All Hosts.
  2. Click a host name to select a host.
  3. Click Edit.
  4. On the Host tab, select a Puppet Environment.
  5. Select the Puppet ENC tab.
  6. Click the Override button to edit the Puppet parameter.
  7. Click Submit to save the changes.