I am trying to create a puppet recipe for a log server and client using syslog-ng. I know I can have custom configuration files using template erb files and replace certain variables in the erb files. I know also that the file
resource just replaces the files either from source or template.
However, my problem is that every client will have different requirements and a different number of files to be redirected and most clients do not use syslog APIs to log their information so I have to specify the file names for each application on every client and accordingly have to keep adding stuff to the server conf file too.
I could not find any kind of loop functionality in puppet that could help me to generate or add information into an existing syslog-ng.conf file. All I see is that the file
resource will replace the existing one, unless I do something smart using exec
.