Hey comm,
I'm using Puppet 4 Open Source.
Being boggled about the following.
I simply would like to have subfolders in my hiera datadir like the following.
`/hieradata/osmajrel/CentOS/7.yaml`.
So that I can make an array of packages and have a specific package installed on CentOS 7 (but **not** on Debian 7 for example)
I'm trying to construct my hiera.yaml `:hierarchy:` with different variables from facter like: "`osmajrel/%{::os.name}/%{::os.release.major}`".
**I tried the following in my `hiera.yaml` `:hierarchy:` to no avail:**
- `"osmajrel/%{::os.name}%{::os.release.major}"` (file containing `base_package` array in `/hieradata/osmajrel/CentOS7.yaml`)
- `"osmajrel/%{::os.name}%-{::os.release.major}"` (file containing `base_package` array in `/hieradata/osmajrel/CentOS-7.yaml`)
- `"osmajrel/%{::os.name}%/{::os.release.major}"` (file containing `base_package` array in `/hieradata/osmajrel/CentOS/7.yaml`)
**It works only if my `hiera.yaml` `:hierarchy:` contains:**
- `"osname/%{::os.name}"` (file containing `base_package` array in `/hieradata/osname/CentOS.yaml`)
- `"osmajrel/%{::os.release.major}"` (file containing `base_package` array in `/hieradata/osmajrel/7.yaml`)
I've got a notify in my packages class to show me which packages would be installed by the agent.
Any idea why merging variables don't seem to work in hiera.yaml?
↧