Forge Home


Create and manage PE Console node groups as resources.


170 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.0.1 (latest)
  • 1.0.0
released Jul 5th 2024
This version is compatible with:
  • Puppet Enterprise 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x
  • Puppet >= 6.0.0 < 9.0.0
  • , , ,
  • update_classes

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppetlabs-node_manager', '1.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppetlabs-node_manager
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppetlabs-node_manager --version 1.0.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



puppetlabs/node_manager — version 1.0.1 Jul 5th 2024


Donated by Ranjit

We would like to inform you that during the release of version 1.0.0, the corresponding tag v1.0.0 was not created. After recognizing this, we created the tag, but it was created from the HEAD commit, so we deleted the newly created tag. To address this, we are publishing a new release, 1.0.1.

Table of Contents

  1. Overview
  2. Requirements
  3. Authentication
  4. Types
  5. Tasks
  6. Functions
  7. Face
  8. Things to do
  9. Experimental


Create and manage PE node groups as resources.


  • *nix operating system
  • Puppet >= 3.7.1
  • New https provider which doesn't need puppetclassify gem


PE Console server

Using the types and functions on the PE Console server will read the configuration at /etc/puppetlabs/puppet/classifier.yaml which contains the default server information and SSL certificate paths. No extra configuration is necessary.

Remote client or custom information

In order to manage node groups from a remote client, you'll need to whitelist a certificate or generate a token with permissions to edit node groups. Create a file at /etc/puppetlabs/puppet/node_manager.yaml in the following format:

server: master.puppetlabs.vm             # Defaults to $settings::server
port: 4433                               # Defaults to 4433
# Supply certs
hostcert: /root/certs/client.pem
hostprivkey: /root/certs/client_key.pem
localcacert: /root/certs/ca.pem
# Or token
token: AJLqDQxalbVSMWrZcX03aGtixvk_S2xGZfQizY9YvzVk

NOTE: The token will be favored if both SSL and a token is provided.



Node_groups will autorequire parent node_groups.

Enumerate all node groups:

  • puppet resource node_group

Example output for puppet resource node_group 'PE MCollective'

node_group { 'PE MCollective':
  ensure               => 'present',
  classes              => {'puppet_enterprise::profile::mcollective::agent' => {}},
  environment          => 'production',
  id                   => '4cdec347-20c6-46d7-9658-7189c1537ae9',
  override_environment => 'false',
  parent               => 'PE Infrastructure',
  rule                 => ['and', ['~', ['fact', 'pe_version'], '.+']],

Node_group parameters

  • description

    Description of the node_group.

  • classes

    Classes that are assigned to the node in hash format. Elements of the hash are class parameters.

    Default (empty hash): {}

  • environment

    Environment selected for this node group.

    Default: production

  • name

    (namevar) Node group's name.

  • id

    Universal ID for the group. This attribute is read-only.

  • override_environment

    Whether or not this group's environment ment setting overrides all other other environments.

    Default: false

  • parent

    The UID for the data group. Can be specified by group name or UID.

    Default: All Nodes

  • rules

    An array of classification rules. To submit an empty ruleset, use '' as your value.

    Default (empty array): []

  • variables

    Global variables for the node group expressed in a hash as { 'var' => 'value' }.

    Default (empty hash): {}

  • data

    Configuration data supplied for automatic parameter lookup for the group. Data for the node group expressed in a hash as { 'class' => { 'param' => 'value' }}. This parameter is supported for PE >=2017.3.x.

    Default (empty hash): {}

  • purge_behavior

    Defines how purging of classification, data and rules will be handled. By default, or when set to all, the node_group resource will ensure classes, data and rules are matched exactly, and remove any values not described by the resource. When set to none, the node_group resource will ensure data, classes and rules described are present with the prescribed values, but will not remove other classification, or other data, present in the node group. The data setting purges only data values, the classes setting purges only classes values and the rule setting purges only rule values. In case of conflict with the node classifiers Nodes must match all rules. and Nodes may match any rule. radio buttons. The node classifier takes precedence over defined node_group code.

    Default: all

    Values: all, data, classes, rule, none



Trigger update-classes job

puppet task run node_manager::update_classes --nodes 'pe-master' environment=production

NOTE: Default environment value is production.



Retrieve all or one node_group and its data.

node_groups() will return:

  "All Nodes"=>{
    "name"=>"All Nodes",
    "rule"=>["and", ["~", "name", ".*"]],
    "variables"=>{}, "id"=>"00000000-0000-4000-8000-000000000000",
  "Production environment"=>{
    "name"=>"Production environment",
    "rule"=>["and", ["~", "name", ".*"]],

node_groups('All Nodes') will return:

  "All Nodes"=>{
    "name"=>"All Nodes",
    "rule"=>["and", ["~", "name", ".*"]],
    "variables"=>{}, "id"=>"00000000-0000-4000-8000-000000000000",

Type: rvalue


Retrieve historical info about a node's check-ins and classification, if check-in storage is enabled.

get_nodes(nodename) will return:

  "name": "Deep Space 9",
  "check_ins": [
      "time": "2369-01-04T03:00:00Z",
      "explanation": {
        "53029cf7-2070-4539-87f5-9fc754a0f041": {
          "value": true,
          "form": [
              "value": true,
              "form": [">=", {"path": ["fact", "pressure hulls"], "value": "3"}, "1"]
              "value": true,
              "form": ["=", {"path": ["fact", "warp cores"], "value": "0"}, "0"]
              "value": true,
              "form": [">" {"path": ["fact", "docking ports"], "value": "18"}, "9"]
  "transaction_uuid": "d3653a4a-4ebe-426e-a04d-dbebec00e97f"

get_nodes() (without the nodename argument) is deprecated, but is included for coverage of the API. It will return the same structure, but for all nodes with their historical check-in information.

Type: rvalue


The node_manager face allows you to interact with endpoints other than the groups endpoint using the type or function. Use the --help flag to explore functionaliy of each action.

# puppet node_manager --help

USAGE: puppet node_manager <action>

Interact with node classifier API

  --render-as FORMAT             - The rendering format to use.
  --verbose                      - Whether to log verbosely.
  --debug                        - Whether to log debug information.

  classes         List class information
  classified      List classification information
  environments    Query environment sync status
  groups          List group information
  pin             Pin a node to a group
  unpin           Unpin a node from groups

See 'puppet man node_manager' or 'man puppet-node_manager' for full help.

Things to do

  • Nothing at the moment


New puppet-less provider with bash here


This repositority is largely the work of some Puppet community members. It is not officially maintained by Puppet, or any individual in particular. Issues should be opened in Github. Questions should be directed at the individuals responsible for committing that particular code.

Transfer notice

This module was previously maintained by Ranjit Viswakumar. It was migrated to Puppet/Perforce in 2024.