On Monday, June 01, 2015 at 1:48 PM, Christopher Wood <
christop...@pobox.com> said:
*snip*
> It sounds like more pain than it's worth, figuring out which hiera key to use
> in two dimensions of lookup instead of one.
It wouldn't be two dimensions, though. As it currently stands, my profile.yaml file contains keys that look like so:
# Logrotate Profile
profile::logrotate::package::present:
'logrotate':
'ensure': 'present'
profile::logrotate::serviceconf: "/etc/logrotate.conf"
profile::logrotate::servicefile: "logrotate.conf"
profile::logrotate::cronloc: "/etc/cron.daily/logrotate"
profile::logrotate::cronfile: "logrotate.cron"
# NTP Profile
profile::ntp::servicename: "ntpd"
profile::ntp::serviceconf: "/etc/ntp.conf"
profile::ntp::servicefile: "ntp.conf"
profile::ntp::package::present:
'ntp':
'ensure': 'present'
'ntpdate':
'ensure': 'present'
. . . with a whole bunch more profile::$MODULE::$KEY entries for other profile modules following that. (We're making an extremely concerted effort to minimize the amount of data built into our modules, due to past experience with how much of a pain in the ass that becomes.)
What I would rather have is a profile directory in my hiera.yaml, where all the files there are loaded automatically by hiera, so I can have profile/logrotate.yaml with the logrotate keys, profile/ntp.yaml with ntp related keys, and so on down the line. This would make it simpler to keep things clear between different modules when setting the assorted defaults.
Unless there's a dead simple way to set a fact that will load a a yaml associated with each assigned class, which would make everything so much easier. . .
--
Robert Davidson