ripienaar / puppet-module-data

Hiera backend that stores data in a module
74 stars 43 forks source link

[QUESTION] Does it support environment hierarchy ? #31

Closed mickaelperrin closed 9 years ago

mickaelperrin commented 9 years ago

Hi,

I created two environments in my node (dev and production).

I would like to provide good defaults for each environments using different hiera files. My first approach was to combine defaults in one hiera file (common.yaml) and it works really great.

Now, I would like to split defaults for each environment.

I updated my hiera.yaml with - "%{::environment}" :


---
:version: 3
:hierarchy:
  - "%{::environment}"
  - common
:backends:
  - yaml

Then in the data folder of my module, alongside common.yaml, I created two files dev.yaml and production.yaml.

But the settings, I put in those files are not retrieved.

Am I missing something ?

Thanks,

ripienaar commented 9 years ago

should work, that's a general hiera question though - best asked to the puppet community like the list, irc etc