13.2. Parameters

Red Hat Satellite parameters define key-value pairs to use when provisioning hosts. These are similar to Puppet's concept of a default scope parameter. You can define parameters when setting up a host with Puppet and also define a hierarchy of parameter inheritance.
The following parameter hierarchy applies:
Global Parameters
The default parameter that applies to every host in Satellite. Configured in ConfigureGlobal parameters.
Domain Parameters
Parameters that affect all hosts in a given domain. Domain parameters override Global parameters. Configured in InfrastructureDomains.
Host Group Parameters
Parameters that affect all hosts in the Host Group. Host Group parameters override both Global and Domain parameters. Configured in ConfigureHost Groups.
Host Parameters
Parameters that affect a specific host. All previous inherited parameters are visible on the Parameters subtab and can be overridden. Configured in HostsAll hosts[choose_a_host]Parameters or HostsContent Hosts[choose_a_host]Parameters.
Different types of parameters also exist:
Simple Parameters
A basic parameter that defines a relationship between a key and value pair.
Smart Parameters
A complex parameter that defines a value for a key but allows conditional arguments, validation, and overrides for specific object types.
Parameterized Classes
Parameters for classes imported from a Puppet Master.

Important

Ensure you enable parameterized class support. Navigate to AdministerSettings, select the Puppet tab, and ensure the Parametrized_Classes_in_ENC is set to True.

13.2.1. Creating a Global Simple Parameter

This procedure shows how to add a new global parameter to Satellite.

Procedure 13.2. To Create a Global Simple Parameter:

  1. Click ConfigureGlobal Parameters.
  2. Click New Parameter.
  3. Type a Name for the parameter's key.
  4. Type a Value for the parameter.
  5. Select if the value is hidden.
  6. Click Submit.

13.2.2. Configuring Smart Parameters

The following procedure configures smart parameters in a Puppet class.

Procedure 13.3. To configure smart parameters:

  1. Click ConfigurePuppet Classes.
  2. Select a class from the list.
  3. Click the Smart Variables tab. This displays a new screen. The left section contains a list of possible parameters the class supports. The right section contains the configuration options for the parameter selected. Click the Add Variable to add a new parameter. Otherwise, select a parameter from the left-hand list.
  4. Type a name for the Parameter field.
  5. Edit the Description text box to add any plain text notes.
  6. Select the Parameter type of data to pass. This is most commonly a string, but other data types are supported.
  7. Type a Default Value for the parameter.
  8. Use the Optional Input Validator section to restrict the allowed values for the parameter. Choose a Validator type (either a list of comma separated values or a regular expression, regexp) and input the allows values or regular expression code in the Validator rule field.
  9. The Override Value For Specific Hosts section at the bottom of the page provides options for overriding values based upon conditional arguments known as Matchers. Define the Order that the host values resolve, then click Add Matcher-Value to add your conditional argument.
    For example, if desired value of the parameter is test for any host with a fully qualified domain name of www.example.com, then specify the Match as fqdn=www.example.com and the Value as test.
  10. Click Submit to save your changes.

13.2.3. Importing Parameterized Classes from a Puppet Master

The following procedure imports parameterized classes from your Puppet Master.

Note

The import of parameterized classes happens automatically if your puppet modules are managed via a Product and a Content View.

Procedure 13.4. To Import Parameterized Classes:

  1. Click ConfigurePuppet Classes.
  2. Click Import from Host Name to import parameterized classes from your Puppet Master.
  3. The Puppet Classes page displays with the new classes listed.

13.2.4. Configuring Parameterized Classes

The following procedure configures parameterized classes.

Procedure 13.5. To Configure Parameterized Classes:

  1. Click ConfigurePuppet Classes.
  2. Select a class from the list.
  3. Click the Smart Class Parameter tab. This displays a new screen. The left section contains a list of possible parameters the class supports. The right section contains the configuration options for the parameter selected.
  4. Select a parameter from the left-hand list.
  5. Edit the Description text box to add any plain text notes.
  6. Select Override to allow Satellite control over this variable. If the check box is not selected, Satellite does not pass this variable to Puppet.
  7. Select the Parameter type of data to pass. This is most commonly a string, but other data types are supported.
  8. Type a Default Value for the parameter.
  9. The Override Value For Specific Hosts section at the bottom of the page provides options for overriding values based upon conditional arguments known as Matchers. Define the Order that the host values resolve, then click Add Matcher-Value to add your conditional argument.
    For example, if desired value of the parameter is test for any host with a fully qualified domain name of www.example.com, then specify the Match as fqdn=www.example.com and the Value as test.
  10. Click Submit to save your changes.