Hi.
I have an interesting use case.
OSSEC is security tool based on server-client architecture. Server
generates keys for agents, and every agent has different key.
Now I want to distribute these keys via puppet. I've come accross hiera
and installed it, and it works superbly, but how to store per-node key
in hiera?
This is my idea:
hiera,yaml:
---
:hierarchy:
- ossec/%{hostname}
- %{operatingsystem}
- common
:backends:
- yaml
:yaml:
:datadir: '/etc/puppet/hieradata'
And now in /etc/puppet/hieradata/ossec I have a bunch of hostname.yaml
files, and all of them has something like this:
---
ossec_client_key: 'blablabla'
ossec_id: '2031'
Is this the right approach? It sure works :)
--
Jakov Sosic
www.srce.unizg.hr