How can I handle config files with multiple, same named directives?
I'm trying to write a module (icinga in this instances though that doesn't matter so much in this case) and while trying to template the main config file I noticed that a couple of the directives were repeated. Normally I just roll through the config file, and everywhere I see a directive, I just replace it with a variable that has the same name (or as close to the same as puppet allows). For example,
cfg_dir=<%= @cfg_dir %>
# Commands definitions cfg_file=/etc/icinga/commands.cfg # Debian also defaults to using the check commands defined by the debian # nagios-plugins package ...