On Monday, March 18, 2013 7:01:10 AM UTC-5, david...@gmail.com wrote:
>
> hi,
>
> Specifically I would like to have something like top scope resource 
> defaults so as to enforce,... well,... default behaviors across our modules
>
> for example, with the exec type: Exec { logoutput => on_failure } 
>
> However our puppet code base is rather extensive and the responsibility 
> for it is "distributed", so I was wondering if there was a way to set those 
> up in one place and affect all class and type instances across our 
> deployments.
>
> The only way I can think I can think of would be to declare it at the top 
> level of the site.pp but I would rather have in a module (we have base 
> modules which get installed on every nodes)
>
> is there any other option?
>
>
If you need a declaration to apply globally, then it must, perforce, appear 
at top scope.  Moreover, it is safest and clearest for it to appear before 
other declarations, such as node blocks.

Although it is possible and valid to make top-scope declarations in any 
manifest, putting them outside the direct purview of site.pp produces 
issues revolving around when and even whether those declarations are 
parsed.  So don't do that.

What you can do, however, is put such declarations in a separate file, and 
'import' that file into site.pp.  That's a common practice for node blocks, 
but they are just common a special case of top-scope declarations.  The 
'import' function doesn't have many good uses any more, but this is exactly 
the sort of thing it's good and appropriate for.


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+unsubscr...@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.


Reply via email to