How to create a node default?

Hi Guys,

I started to use the foreman with ENC in my servers with puppet.

But I need to create a node default and I don't know, how to do this.

Anyone, could help me ?

Generally speaking, you don't want to. "node default" is a concept
that exists solely within site.pp, and while you can mix site.pp with
an ENC, it has caveats you should be aware of[1]. In particular,
defining classes in a "node default" block would be something I'd
avoid, since that's the ENC's job. Defining resource defaults is
probably fine though.

The better approach for classes is to define a "Base" (or similar
name) hostgroup or configgroup, and ensure it's assigned to all your
nodes. This keeps visibility where it should be, and doesn't introduce
strange behaviour when trying to debug where a node inherited a class
from (since you would naturally start with the classes coming from the
ENC).

HTH,
Greg

[1]https://docs.puppetlabs.com/guides/external_nodes.html#how-merging-works

Tks for your answer Greg.

Do you have a link ou a video to send me how to create or define a "Base"
on hostgroup or configgroup ?

··· On Wed, Dec 3, 2014 at 2:24 PM, Greg Sutcliffe wrote:

Generally speaking, you don’t want to. “node default” is a concept
that exists solely within site.pp, and while you can mix site.pp with
an ENC, it has caveats you should be aware of[1]. In particular,
defining classes in a “node default” block would be something I’d
avoid, since that’s the ENC’s job. Defining resource defaults is
probably fine though.

The better approach for classes is to define a “Base” (or similar
name) hostgroup or configgroup, and ensure it’s assigned to all your
nodes. This keeps visibility where it should be, and doesn’t introduce
strange behaviour when trying to debug where a node inherited a class
from (since you would naturally start with the classes coming from the
ENC).

HTH,
Greg

[1]
https://docs.puppetlabs.com/guides/external_nodes.html#how-merging-works


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.