Hi, is it possible to let a node definition supersede another if there are two node definitions that match the sertname? node /.*\.klientdrift\.uib\.no$/ inherits client {} node puppettestmachine.klientdrift.uib.no inherits client {} node puppetdevmachine.klientdrift.uib.no inherits client {} I would like the first to hit all our machines in one subdomain, but be able to have single machines with other definitions. Ideally the single nodes should inherit the wildcard one. Bjørge -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Sep 8, 6:48 am, Bjorge Solli <bjo...@solli.priv.no> wrote:> Hi, > > is it possible to let a node definition supersede another if there are > two node definitions that match the sertname? > > node /.*\.klientdrift\.uib\.no$/ inherits client {} > node puppettestmachine.klientdrift.uib.no inherits client {} > node puppetdevmachine.klientdrift.uib.no inherits client {} > > I would like the first to hit all our machines in one subdomain, but be > able to have single machines with other definitions. Ideally the single > nodes should inherit the wildcard one.The Puppet Language Guide specifies exactly how nodes are matched to node definitions: 1) If a literal node name matches the node exactly then that is used, otherwise 2) If one or more node name regexes matches the node then the first of those is used, otherwise 3) If there is a default node definition then that is used. That seems like what you want, except the inheritance. I don''t know whether it is possible to inherit a regex node definition, but you can certainly solve that problem as you show in your example above. All told, you appear already to have it right. Is it not working for you? A bit more explanation of the problem would help us help you. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 08/09/11 15:23, jcbollinger wrote:> All told, you appear already to have it right. Is it not working for > you? A bit more explanation of the problem would help us help you.To be honest I haven''t tried it like that, I just assumed the language to be declarative and thus order not important. Good to know the developers are as smart as me;-) Thanks for the prompt reply, I have now found the Puppet Language Guide and will check there first next time:-) Bjørge -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.