Declare classes
Classes are blocks of Puppet code that configure nodes and assign resources to nodes.
Before you begin:
The class that you want to apply must exist in an installed module. You can download modules from the Puppet Forge or create your own module. For information about modules and installing modules, refer to the Modules overview and Installing and managing modules from the command line in the Puppet documentation.
The class that you want to apply must exist in an installed module. You can download modules from the Puppet Forge or create your own module. For information about modules and installing modules, refer to the Modules overview and Installing and managing modules from the command line in the Puppet documentation.
- In the Puppet Enterprise (PE) console, click Node groups and select the node group that you want to add the class to.
- On the Classes tab, select the class to add.The Add new class field suggests classes that your PE primary server knows about and that are available in the environment defined in the node group's settings.
If classes are missing, check that:
- You have correctly installed the module containing the class you want to assign.
- The module is installed in the environment defined in the node group's settings. For information about the Environment setting for classification node groups, refer to Create classification node groups.
- Your Puppet code has been deployed since installing the module or making changes to node groups. If you're using Code Manager or r10k for Managing and deploying Puppet code, you might need to trigger a code deployment.
- Click Add class and then commit changes.Classes don’t appear in the class list until they’re retrieved from the primary server and the environment cache is refreshed. By default, both of these actions occur every three minutes. To override the default refresh period and force the node classifier to retrieve the classes from the primary server immediately, click the Refresh button.