Open ggeldenhuis opened 5 years ago
@ggeldenhuis how would you structure the hierarchy in hiera for conditionals like: https://github.com/kemra102/puppet-auditd/blob/master/manifests/params.pp#L39-L53
@vinzent I would probably do something like the following:
---
version: 5
defaults:
datadir: 'data'
data_hash: 'yaml_data'
hierarchy:
- name: 'Full Version'
path: '%{facts.os.name}-%{facts.os.release.full}.yaml'
- name: 'Major Version'
path: '%{facts.os.name}-%{facts.os.release.major}.yaml'
- name: 'Distribution Name'
path: '%{facts.os.name}.yaml'
- name: 'Operating System Family'
path: '%{facts.os.family}.yaml'
- name: 'common'
path: 'common.yaml'
You would need to create an extra level to catch the amazon OS though. Its a bit of a rushed answer but I am sure it would be achievable with some careful thought. It is a big change but I do believe ultimately worth the extra effort. Will try and craft a workable solution and update the ticket.
This ticket is more meant as a todo item. For future compatibility it would great to get rid of the params.pp class in favour of data in modules. It means we can get rid of inheritance and make it easier and cleaner to adapt the module for multiple platforms.