Hi for my dns servers the manifest (defines for the zones and keys) gets pretty long. I have the same problem with my icinga configuration (host and service checks, for hosts not running puppet (like switches and routers) where I cannot use exported resources). I know I can put individual nodes into separate .pp files I''ve already done that. What I am looking for is some sort of simple inline include. Is there such a concept or maybe an other way to simplify node definition. My manifests look like this: node dns-master-servers inherits... { nsd::key { "key-name": algorithm => "hmac-sha256", secret => "random sha256 key", } nsd::key { ... # about 20 of those } nsd::zone { "example.com": slaves => $nsd_slaves, key => "key-name", } nsd::zone { ... # about 100 of those } } Regards -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Jared Curtis
2013-Feb-02 16:25 UTC
[Puppet Users] Split node definition into multiple files
Couldn''t you just add a new include to sites.pp called zones.pp then build a class within it to include on your DNS nodes? class myzones { nsd::zoneĀ { ... } ..... } node DNS { include myzones ..... } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
jcbollinger
2013-Feb-04 15:53 UTC
[Puppet Users] Re: Split node definition into multiple files
On Saturday, February 2, 2013 10:25:14 AM UTC-6, Jared Curtis wrote:> > Couldn''t you just add a new include to sites.pp called zones.pp then build > a class within it to include on your DNS nodes? > > class myzones { > nsd::zone { ... } > ..... > } > > node DNS { > include myzones > ..... > }Moving the resources out of node blocks and into classes is certainly the way to approach the problem. Sites.pp should have nothing to do with it, however, and (separately) the new class(es) should go in a module. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Andre Keller
2013-Feb-04 22:40 UTC
Re: [Puppet Users] Re: Split node definition into multiple files
Hi thank you for your inputs. Am 04.02.2013 16:53, schrieb jcbollinger:> On Saturday, February 2, 2013 10:25:14 AM UTC-6, Jared Curtis wrote: > > Couldn''t you just add a new include to sites.pp called zones.pp > then build a class within it to include on your DNS nodes? > > > and (separately) the new class(es) should go in a module.I''ve done that now and grouped the entries using child classes: class myzones { include myzones::customer1 } class myzones::customer1 { nsd::zone { ... } } etc.. That''s more or less what I was looking for. Is there a way to automatically include child classes? Something like include myzones::* :-) Regards -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
jcbollinger
2013-Feb-05 14:07 UTC
Re: [Puppet Users] Re: Split node definition into multiple files
On Monday, February 4, 2013 4:40:19 PM UTC-6, Andre Keller wrote:> > > Is there a way to automatically include child classes? Something like > include myzones::* :-) > >No, not as such. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.