saz/puppet-rsyslog — pull request #99 by jae2 (2014-08-14 22:43:33+00:00)
Title: Allow option to avoid loading imfile module twice.

This throws a warning with version 8 of rsyslog.

With version 8 of rsyslog we get warnings such as:
'module 'imfile' already in this config, cannot be added [try http://www.rsyslog.com/e/2221 ]'.

This is because the imfile module should only be loaded once. If we have multiple imfile's by default we will always use a template which has the $ModLoad imfile statement in (see https://github.com/saz/puppet-rsyslog/blob/master/templates/imfile.erb).

The rsyslog documentation also explains that the imfile module should only be loaded once: http://www.rsyslog.com/doc/imfile.html . This commit addresses this problem.

Basic idea is: extra_modules are defined in the array.
If this array has entries create a modload imfile.
If not don't create the modload imfile.
If an imfile is created in the manifest without imfile defined in extra_modules it will automatically add the 'modload imfile' statement to the imfile (so we don't break backwards compatibility).

Squashed commits from earliar PR: https://github.com/saz/puppet-rsyslog/pull/88