Hi Everyone, I am struggling a bit with the order of precedence of node classifications. When using .pp files to classify nodes, what happens if a node corresponds to two different manifests. For example, if I have .pp files that select nodes based on hostnames and I have another .pp file that selects hosts based in data center location, will both manifests be applied accordingly? Also, is the default manifest applied to ALL hosts, complimentary of any manifests that explicitly apply to the host? Or, is the default applied ONLY if no other manifests apply to that host? Thank you very much! Bee -- 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. For more options, visit https://groups.google.com/groups/opt_out.
http://docs.puppetlabs.com/puppet/3/reference/lang_node_definitions.html According to that, default only applies if nothing else matches. For your other question, how are you doing multiple manifests? With imports? On Wednesday, July 31, 2013 9:53:13 AM UTC-7, Worker Bee wrote:> > Hi Everyone, > > I am struggling a bit with the order of precedence of node > classifications. When using .pp files to classify nodes, what happens if a > node corresponds to two different manifests. For example, if I have .pp > files that select nodes based on hostnames and I have another .pp file that > selects hosts based in data center location, will both manifests be applied > accordingly? > > Also, is the default manifest applied to ALL hosts, complimentary of any > manifests that explicitly apply to the host? Or, is the default applied > ONLY if no other manifests apply to that host? > > Thank you very much! > Bee >-- 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. For more options, visit https://groups.google.com/groups/opt_out.
On Wednesday, July 31, 2013 11:53:13 AM UTC-5, Worker Bee wrote:> > Hi Everyone, > > I am struggling a bit with the order of precedence of node > classifications. When using .pp files to classify nodes, what happens if a > node corresponds to two different manifests. For example, if I have .pp > files that select nodes based on hostnames and I have another .pp file that > selects hosts based in data center location, will both manifests be applied > accordingly? > >Puppet chooses at most one node definition for each catalog request. The document Ellison referred you to also describes how the best match is chosen when there are several node definitions that match. In particular, as he said, the default node definition is chosen only if no other node definition matches. You can use node inheritance if you want one node definition to encompass also everything in another (such as the default node), but be careful: history shows that people have a tendency to make incorrect assumptions about how node inheritance works. (Details of this, too, are in the documentation.) PL strongly discourages use of node inheritance, whereas I take a slightly softer stance. Node inheritance is fine with me as long as you really understand what it does, and that''s really what you want. 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. For more options, visit https://groups.google.com/groups/opt_out.