Thank you for your help John. I was expecting top level declaration may cause problems, and tried to avoid it even before my problem raised, but didn't realize I did such one ;-)
On Thursday, October 4, 2012 3:23:32 PM UTC+2, jcbollinger wrote: > > > > On Thursday, October 4, 2012 4:00:53 AM UTC-5, Mike wrote: >> >> Thanks for your answer. >> >> I think I've found my problem >> >> I had an include in the ubuntu base.pp >> modules/ubuntu-common/manifests/base.pp: >> >> include ubuntu-something >> >> class ubuntu-common::base { >> file { "/etc/openntpd/ntpd.conf": >> ensure => file, >> owner => root, >> group => root, >> mode => 644, >> content => >> template("ubuntu-common/$operatingsystemrelease/etc-openntpd-ntpd.conf.erb"), >> } >> } >> >> If I understand it right, OpenBSD works until this file is included in >> cache, when an Ubuntu agent connects this file is loaded and as the >> "include" is outside the class it will be included for OpenBSD too, am I >> right? At least moving the include inside the ubuntu-common::base class >> fixed my issue. >> > > > That's conceivable. Any declaration at top-level in any manifest applies, > in principle, to all nodes. Depending on the manifest in which it appears, > however, it may or may not actually be parsed. This is an excellent reason > to avoid such declarations except in site.pp and any files directly or > indirectly 'import'ed by site.pp. I cannot confirm the specifics of > Puppet's caching strategy with respect to such declarations, but I can > definitely say that the declaration was placed incorrectly. > > > >> I find it a bit annoying that something may fail depending on which agent >> connects, is there something I can do (like a puppet master option) so that >> in my example OpenBSD would fail directly and not only once an Ubuntu agent >> connects > > > > There may be master-side cache management directives you could use, but > something like that would have just kept the error in your manifests > hidden, rather than revealing it. Meanwhile, you would suffer a > performance penalty and concomitant reduction in capacity at your > puppetmaster. > > Although it's not exactly what you were looking for, I think you can avoid > a recurrence of this sort of problem by ensuring that all your declarations > are inside classes or nodes, or possibly in site.pp. That should avoid > flip flops with respect to which declarations Puppet sees for each client. > > > John > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Qcq1KeW9uj0J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.