exclude puppetmaster from default

137 views
Skip to first unread message

Andrei-Florian Staicu

unread,
May 30, 2012, 12:13:34 PM5/30/12
to puppet...@googlegroups.com
Hi all,

Can you tell me if the puppetmaster (which is also a puppet node) can
be excluded from the default node definition?
The idea is that new unclassified nodes should get the puppet.conf and
auth.conf files by default, but these files are pretty different on
the master.

Thanks.

Peter Bukowinski

unread,
May 30, 2012, 12:39:37 PM5/30/12
to puppet...@googlegroups.com
The default node definition is only applied to nodes that aren't included in any other node definitions. As long as your puppetmaster node is included in any other node definition — either explicitly (e.g. 'puppet.domain.org') or by glob (e.g. /^puppet/) — the default node definition will not affect it.

-- 
Peter M. Bukowinski
Sr. Systems Engineer
Janelia Farm Research Campus, HHMI

Andrei-Florian Staicu

unread,
May 30, 2012, 12:49:36 PM5/30/12
to puppet...@googlegroups.com
On Wed, May 30, 2012 at 7:39 PM, Peter Bukowinski <pmb...@gmail.com> wrote:
> On May 30, 2012, at 12:13 PM, Andrei-Florian Staicu wrote:
>
> Hi all,
>
> Can you tell me if the puppetmaster (which is also a puppet node) can
> be excluded from the default node definition?
> The idea is that new unclassified nodes should get the puppet.conf and
> auth.conf files by default, but these files are pretty different on
> the master.
>
> Thanks.
>
>
> The default node definition is only applied to nodes that aren't included in
> any other node definitions. As long as your puppetmaster node is included in
> any other node definition — either explicitly (e.g. 'puppet.domain.org') or
> by glob (e.g. /^puppet/) — the default node definition will not affect it.
>

Ok, so this will exactly what I want for new (i.e. which don't already
have a definition) nodes.
Then how can I have a definition for all nodes, except the puppet master?

Brian Gupta

unread,
May 30, 2012, 1:19:50 PM5/30/12
to puppet...@googlegroups.com
We basically use a base node class, that is applied to every host. For
managing puppet.conf we have an exception for the puppetmasters that
is setup in an erb template. Here is an example
https://gist.github.com/2837734

There are probably simpler ways to do this, e.g. via file
conditionals, but we needed to template for other reasons.

-Brian

> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>
Reply all
Reply to author
Forward
0 new messages