15.3. Provisioning Discovered Hosts
15.3.1. Manually Provisioning Hosts
Procedure 15.2. To Manually Provision a Discovered Host:
- Navigate to → .
- Select the host you want to provision and click .
- On the host's Edit page, complete the necessary details, and then click .
15.3.2. Decommissioning Discovered Hosts
- Shutdown the host.
- Navigate to → .
- In the Name column find the host you want to decommission and then select from the corresponding drop-down menu.
15.3.3. Automatically Provisioning Hosts
Procedure 15.3. To Create a Provisioning Rule:
- Navigate to → .
- Click . Specify the following parameters of the provisioning rule:
- Name is the name of the rule displayed in the list of rules. This name must not contain spaces or non-alphanumeric characters.
- Search is the search statement used to match discovered hosts for the particular rule. You can use scoped search syntax to define it. See Section 15.3.4, “Scoped Search Syntax” for examples of using scoped search.
- Host Group is the host group to be assigned to a matching host before starting the provisioning process. Make sure that the selected host group has all the required parameters set; required parameters are marked with an asterisk (*).
- Hostname defines a pattern for assigning human-readable host names to the matching hosts. When left blank, the host name is assigned in the format "macMACADDRESS" by default. The same syntax used for provisioning templates is used in this instance. See Section 15.3.5, “Host Name Patterns” for more information and examples.
- Hosts limit is the the maximum number of provisioned hosts per rule. If the limit is reached, the rule will not take effect until one or more hosts are deleted. Typical use cases are rules per server rack or row when it is necessary to change provisioning parameters such as host name or host group per entry. You can set this value to zero (0) to specify no limit.
- Priority specifies the order of execution of rules. The value must be greater than or equal to zero. A lower value indicates a higher priority. If two rules have the same priority, the first rule encountered is applied.
- Enabled provides the option to temporarily enable or disable rules.
- Click to save the rule.
discovery_auto variable to provide automatic provisioning according to specified rules.
Procedure 15.4. To Enable Automatic Provisioning:
- Navigate to → → in the Satellite web UI.
- Locate
discovery_autoin the Name column, and set its value totrue. - Click .
15.3.4. Scoped Search Syntax
- facts.architecture = x86_64
- facts.bios_vendor ~ 'Dell*'
- facts.macaddress = "aa:bb:cc:dd:ee:ff"
- facts.macaddress_eth0 = "aa:bb:cc:dd:ee:ff"
- facts.ipaddress_eth1 ~ "192.168.*"
- facts.architecture ^ (x86_64,i386)
Note
Table 15.1. Facts that Allow Numerical Comparison
| Search Parameter | Description | Example Usage |
|---|---|---|
| cpu_count | The number of CPUs | cpu_count >= 8 |
| disk_count | The number of disks attached | disk_count < 10 |
| disks_size | The total amount of disk space (in MiB) | disks_size > 1000000 |
15.3.5. Host Name Patterns
@host attribute, the rand() function for random integers is available. For example:
- application-server-<%= rand(99999) %>
- load-balancer-<%= @host.facts['bios_vendor'] + '-' + rand(99999) %>
- wwwsrv-<%= @host.hostgroup.name %>
- minion-<%= @host.discovery_rule.name %>
- db-server-<%= @host.ip.gsub('.','-') + '-' + @host.hostgroup.subnet.name %>>
Important
15.3.6. Using the Discovery Plug-in on the Command Line
hammer command to perform certain tasks related to discovery. Run the hammer -h command to verify your configuration:
$ hammer -h | grep discovery discovery Manipulate discovered hosts. discovery_rule Manipulate discovered rules.
hammer discovery -h command to view the available options. For example, you can use the following command to reboot a discovered host (assuming its ID is 130):
$ hammer discovery reboot -id 130 Host reboot started

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.