Simon Flash
2013-May-15 11:54 UTC
[Puppet Users] Puppet run on node even when not specified in site.pp
Hello, First of, I am kinda new to puppet and still in the learning-part. To my problem: I have a site.pp which contains the following part: node ''linuxnod10.rosi.local'' { include nrpe include nodes_script } node ''linuxnod1.rosi.local'' { include nrpe include nodes_script } node ''linuxnod2.rosi.local'' { include nrpe include nodes_script } node ''linuxnod3.rosi.local'' { include nrpe include nodes_script } node ''linuxnod4.rosi.local'' { include nrpe include nodes_script } node ''linuxnod5.rosi.local'' { include nrpe include nodes_script } node ''linuxnod6.rosi.local'' { include nrpe include nodes_script } node ''linuxnod7.rosi.local'' { include nrpe include nodes_script } node ''linuxnod8.rosi.local'' { include nrpe include nodes_script } node ''linuxnod9.rosi.local'' { include nrpe include nodes_script } All works well for linuxnod1-10, (and yes, I know I can do a regex, don''t ask me why I haven''t done one). The problem is that linuxnod11.rosi.local runs the nrpe and nodes_script too! I don''t want that to happened. linuxnod11.rosi.local have run those modules before, is it cached somehow after that? If so, can I disable it? Any disadvantage of disabling? Or why is linuxnod11.rosi.local also run it? Thanks in advance, Simon -- 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.
Jeff Zellner
2013-May-15 12:21 UTC
Re: [Puppet Users] Puppet run on node even when not specified in site.pp
Hi Simon, Puppet only has a concept of ''things I need to do''. What I mean is that removing config from a node does not undo what has been previously configured. You need to explicitly do that yourself with ensure => absent, etc on the configured resources. Cheers, Jeff On May 15, 2013 7:54 AM, "Simon Flash" <sb222ck@student.lnu.se> wrote:> Hello, > > First of, I am kinda new to puppet and still in the learning-part. To my > problem: I have a site.pp which contains the following part: > > node ''linuxnod10.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod1.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod2.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod3.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod4.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod5.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod6.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod7.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod8.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod9.rosi.local'' { include nrpe include nodes_script } > > All works well for linuxnod1-10, (and yes, I know I can do a regex, don''t > ask me why I haven''t done one). > > The problem is that linuxnod11.rosi.local runs the nrpe and nodes_script > too! I don''t want that to happened. > linuxnod11.rosi.local have run those modules before, is it cached somehow > after that? If so, can I disable it? Any disadvantage of disabling? Or why > is linuxnod11.rosi.local also run it? > > Thanks in advance, > Simon > > -- > 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. > > >-- 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-May-15 13:50 UTC
[Puppet Users] Re: Puppet run on node even when not specified in site.pp
On Wednesday, May 15, 2013 6:54:38 AM UTC-5, Simon Flash wrote:> > Hello, > > First of, I am kinda new to puppet and still in the learning-part. To my > problem: I have a site.pp which contains the following part: > > node ''linuxnod10.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod1.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod2.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod3.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod4.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod5.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod6.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod7.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod8.rosi.local'' { include nrpe include nodes_script } > node ''linuxnod9.rosi.local'' { include nrpe include nodes_script } > > All works well for linuxnod1-10, (and yes, I know I can do a regex, don''t > ask me why I haven''t done one). > > The problem is that linuxnod11.rosi.local runs the nrpe and nodes_script > too! I don''t want that to happened. > linuxnod11.rosi.local have run those modules before, is it cached somehow > after that? If so, can I disable it? Any disadvantage of disabling? Or why > is linuxnod11.rosi.local also run it? > >There are basically three possibilities: 1. There is some other node block that is matching linuxnod11 and making the declarations you observe to be applied. That might be a ''default'' block, for example. 2. The same declarations appear at top scope, outside any node block, in which case they will be applied to every node. 3. linuxnod11 is impersonating one of the other nodes by presenting that node''s SSL certificate instead of one of its own. Alternative (3) bears a little more explanation. What you need to understand there is that Puppet identifies nodes via the SSL certificates they present to the master, NOT via the facts they present (such as $hostname, for example). It is the certificate''s certname that Puppet matches against node blocks. Puppet''s default behavior when creating a certificate is to use the node''s hostname as the certificate''s certname, and in that case the master''s certname-based node matching behavior cannot be distinguished from hostname-based matching. Until some node presents a certificate that doesn''t follow form. In particular, if linuxnod11 presents a copy of a certificate generated for one of the other nodes, then it will get the catalog intended for that other node. 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.