How node group inheritance works

Node groups are organized in a parent-child-grandchild hierarchy. When added to a group, nodes inherit classes, parameters, variables, and rules from their immediate node group and the group's ancestors.

  • Classes: If a class is declared in an ancestor node group, the class is inherently declared in all node groups descending from that group.
  • Class parameters and variables: Descendant node groups inherit class parameters and variables from ancestors unless a different value is set in a descendant node group.
    Because nodes can belong to multiple groups in separate hierarchies, it’s possible for two node groups to contribute conflicting variable or class parameter values. Conflicting values cause Puppet runs on agent nodes to fail.
  • Dynamic node group rules: To belong to a group, a node must match all rules in the immediate group and the rules in the ancestor groups. Use rule inheritance to refine group membership: Create broad rules for parent groups (such as an OS family) and more specific rules for the child groups that refine the parent group rules (such as specific platforms or versions). This way you can take a large, generic set of nodes and filter them into specific child groups.
In the console, go to Node groups to see how node groups are related. The Node groups page shows a hierarchical view of your node groups. From the command line, you can use the group-children endpoint to review group lineage.

Related information