Adding Classes Quick Start Guide

A newer version is available; see the version menu above for details.


Every module contains one or more classes. Classes are named chunks of Puppet code and are the primary means by which Puppet Enterprise configures nodes. The Puppet Labs Registry module you installed in the Module Installation QSG contains a class called registry. In this example, you’ll use the registry class to supply the types and providers necessary to create and manage Windows Registry keys and values with Puppet.

In this example, we will create a group called windows_example and add the registry class to it.

Prerequisites: This guide assumes you’ve already installed a monolithic PE deployment, and have installed at least one Windows agent node and the puppetlabs-registry module.

Note: The process for adding classes to agent nodes in the console is the same on both Windows and *nix operating systems.

Create the windows_example Group

To create the windows_example group:

  1. From the console, click Nodes > Classification.
  2. In the Node group name field, name your group (e.g., windows_example).
  3. Click Add group.
  4. Select the windows_example group.
  5. From the Rules tab, in the Node name field, enter the name of the PE-managed node you’d like to add to this group.
  6. Click Pin node.
  7. Click Commit 1 change.

    adding node to windows group

  8. Repeat steps 5-7 for any additional nodes you want to add.

Add the registry Class to the Example Group

To add the registry class to the example group:

  1. From the console, click Nodes > Classification.

  2. Select the windows_example group.

  3. Click the Classes tab.

  4. In the Class name field, begin typing registry, and select it from the autocomplete list.

  5. Click Add class.

  6. Click Commit 1 change.

    Note that the registry class now appears in the list of classes for your agent node.

  7. Puppet runs, which configures the windows_ example group using the newly-assigned class. Wait one or two minutes.

Next: Quick Start: Classifying Nodes and Assigning User Permissions

↑ Back to top