Hello,

I'm running Puppet agent stand-alone on Windows.

I got data-in-modules working. However, no matter what I put into the 
module hiera.yaml,
I can only override the defaults from common.yaml by osfamily (and not, 
e.g., by environment).

In the setup below the following command outputs:

>puppet apply --binder -e "notice lookup ('my_key')" --environment=local
Notice: Scope(Class[main]): windows-value
Notice: Compiled catalog for myhostname in environment local in 1.40 seconds

And if I delete the osfamily directory, the same command outputs 
"common-value".

So, even though osfamily is not part of the hierarchy, it's used to 
override the common value.
Conversely, environment is part of the hierarchy, but it's not used.

Did I miss anything?

Thanks,
Igor.


Module structure:

my_module/
    hiera.yaml
    data/
        common.yaml
        environment/
            local.yaml
        osfamily/
            windows.yaml


hiera.yaml contains:

---
version: 2
hierarchy:
  [
   ['environment', '${environment}', 'data/environment/${environment}'],
   ['common', 'true', 'data/common']
  ]


data/common.yaml contains:

---
my_key: 'common-value'


data/osfamily/windows.yaml contains:

---
my_key: 'windows-value'


data/environment/local.yaml contains:

---
my_key: 'local-value'

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to