All puppet agent have on puppet.conf noop = true I need to make sure that some classes (like the class that configure the puppet-agents or mcollective) can run regardless of noop setting.
Following documentation for puppet 4.5.3 i found that https://docs.puppet.com/puppet/4.5/reference/metaparameter.html#noop <https://docs.puppet.com/puppet/latest/reference/metaparameter.html#noop> and https://docs.puppet.com/puppet/4.5/reference/lang_classes.html#using-resource-like-declarations I changed corresponding include for resource like declaration of those classes, but resources contained inside that class still acted normally. It seems to be that resources contained within a class will behave according to configuration set on puppet.conf even if the class has set noop to a different value. Code i used to test this issue: class foo { notify { '1.Resource noop true' : noop => true, } notify { '2.Resource noop false' : noop => false, } notify { "3.Class noop ${noop}" : } notify { "4.Client noop ${clientnoop}" : } } class { 'foo' : noop => true, } What I expected: Notify 1 should print as no-op regardless of other configuration. Notify 2 should print as yes-op regardless of other configuration. Notify 3 would print as no-op because of class having noop => true. Notify 4 would print as no-op because of class having noop => true. What I'm seeing: Notify 1 prints as expected Notify 2 prints as expected Notify 3 prints as yes-op, not expected Notify 4 prints as yes-op, not expected Output from # puppet apply test.pp Notice: Compiled catalog for xxxxxxx in environment production in 0.06 seconds Notice: /Stage[main]/Foo/Notify[1.Resource noop true]/message: current_value absent, should be 1.Resource noop true (noop) Notice: 2.Resource noop false Notice: /Stage[main]/Foo/Notify[2.Resource noop false]/message: defined 'message' as '2.Resource noop false' Notice: 3.Class noop true Notice: /Stage[main]/Foo/Notify[3.Class noop true]/message: defined 'message' as '3.Class noop true' Notice: 4.Client noop false Notice: /Stage[main]/Foo/Notify[4.Client noop false]/message: defined 'message' as '4.Client noop false' Notice: Applied catalog in 0.14 seconds I don't think I have misunderstood the documentation from puppet, but i could be crazy. Also, what happens with classes inside classes, those they get the noop from the parent class or from the configuration Thanks Julio -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/1f35f5f7-5822-4480-af65-1ca649224d4d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
