6

I have some confusion about the default node. Will the classes defined in the default node only be applied if there is not other node definition, or do they get default and any other matching node definitions applied?

For instance I have a Linux::Admins class which specifies Linux Admins who belong in the wheel group. Do I need to copy that class into every node definition, or does putting it in the default node ensure it will be added to explicitly defined nodes as well?

I don't see much reading on the default node, can you point me to some good documentation on nodes for puppet please? I use Puppet 2.7.

1 Answer 1

8

The default node's definition and the classes in it will only apply if the node doesn't match any other node definition.

Take a look at node inheritance to be able to apply a class to all nodes without copying it to all of them.

Better yet, take a look a using Hiera to declare your nodes, which is the way I'd recommend doing it - Hiera adds a lot of flexibility and doesn't suffer from some of the problems of node declaration and inheritance in manifests (most notably, overriding global settings at the node and integrating class parameters from multiple different inheritance levels).

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .