Defining nodes and node grouping
In order to push a manifest, its classes, and assets to systems, they need to be known by Puppet Master. Grouping is practical if you want to push a manifest to a number of hosts without having to modify each configuration node.
How to do it…
In contrast to what the title wants you to believe, you cannot create a group and add nodes. However, you can group nodes and make them behave in a similar way to groups.
Nodes and node groups are defined in /etc/puppet/manifests/site.pp
or a file at /etc/puppet/manifests/site.pp
.
Create the configuration node
Create a /etc/puppet/manifests/site.pp/rhel7-client.pp
file with the following contents:
node 'rhel7-client.critter.be' { }
Create a node group
Create a /etc/puppet/manifests/site.pp/rhel7-clientgroup.pp
file with the following contents:
node 'rhel7-client00.critter.be', 'rhel7-client01.critter.be', 'rhel7-client02.critter.be' { }
There's more…
If you have a strict naming convention, you can use regular expressions
to define...