Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Needs Assessment
-
Bug Fix
-
The hiera.yml template has been updated for new modules so that data from files named after the operating system are higher in the hierarchy than files named after the operating system family.
-
Needs Assessment
Description
The default hiera.yaml that is laid down by PDK is as follows:
---
|
version: 5defaults: # 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: "osfamily/major release" |
paths:
|
- "os/%{facts.os.family}/%{facts.os.release.major}.yaml" |
# Used for Solaris |
- "os/%{facts.os.family}/%{facts.kernelrelease}.yaml" |
# Used to distinguish between Debian and Ubuntu
|
- "os/%{facts.os.name}/%{facts.os.release.major}.yaml" |
- name: "osfamily" |
paths:
|
- "os/%{facts.os.family}.yaml" |
- "os/%{facts.os.name}.yaml" |
- name: 'common' |
path: 'common.yaml' |
I believe that this is incorrect since facts.os.name is more specific than facts.os.family and therefore the two should be reversed as follows:
---
|
version: 5defaults: # 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: "osfamily/major release" |
paths:
|
- "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" |
# Used to distinguish between Debian and Ubuntu
|
- name: "osfamily" |
paths:
|
- "os/%{facts.os.name}.yaml" |
- "os/%{facts.os.family}.yaml" |
- name: 'common' |
path: 'common.yaml' |