Hey Reinhard,

On Monday, April 10, 2017 at 7:42:42 AM UTC-7, Reinhard Vicinus wrote:

> We use the pseudo variable to set up a basic configuration for every 
> module we use when we need other default values then the ones set by the 
> module author. In the past we had the configuration in the global.yaml at 
> the lowest level but as we use a lot of different modules the global.yaml 
> got obfuscated and we separated the configuration into different files via 
> the calling_module pseudo variable.
>

OK, just to make sure I understand you: The data in 
modules/%{calling_module} IS just global data, right? As in:

* Files like modules/apache.yaml don't override any keys from the 
global.yaml file.
* Files like modules/apache.yaml and modules/ntp.yaml don't set any of the 
same keys; their responsibilities are fully separated.
* You just want to use separate files to reduce clutter. All you want is to 
not have a 3000 line yaml doc.

If so, use the `glob(s)` setting for a hierarchy level. Like this!

hierarchy:
  - name: "Normal global data"
    path: global.yaml
  - name: "Overrides for module defaults"
    glob: "modules/*.yaml"

That should work with your existing data. It will load all the yaml files 
from your modules/ directory, and as long as they don't overlap it'll treat 
them as one big data file without forcing you to maintain a 3000 line yaml 
doc. (If they DO overlap, the first file in alphabetical order will win for 
a given key.) 
 

-- 
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/529c704d-03ab-4324-9b78-d6ae59186a03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to