diff --git a/hiera.yaml b/hiera.yaml index 0f5c657..545fff3 100644 --- a/hiera.yaml +++ b/hiera.yaml @@ -1,12 +1,21 @@ --- version: 5 -defaults: - datadir: "data" +defaults: # Used for any hierarchy level that omits these keys. + datadir: data # This path is relative to hiera.yaml's directory. + data_hash: yaml_data # Use the built-in YAML backend. hierarchy: - - name: "Yaml backend" - data_hash: yaml_data + - name: "osfamily/major release" paths: - - "nodes/%{trusted.certname}.yaml" - - "common.yaml" + # Used to distinguish between Debian and Ubuntu + - "os/%{facts.os.name}/%{facts.os.release.major}.yaml" + - "os/%{facts.os.family}/%{facts.os.release.major}.yaml" + # Used for Solaris + - "os/%{facts.os.family}/%{facts.kernelrelease}.yaml" + - name: "osfamily" + paths: + - "os/%{facts.os.name}.yaml" + - "os/%{facts.os.family}.yaml" + - name: 'common' + path: 'common.yaml'