kemra102 / puppet-auditd

Manage the audit daemon and it's rules.
BSD 2-Clause "Simplified" License
14 stars 54 forks source link

Remove 'alias' metaparameter from concat resource #33

Closed antaflos closed 6 years ago

antaflos commented 6 years ago

Under Puppet 5 (and possibly Puppet 4) setting the 'alias' metaparameter and referencing the concat resource by the alias name leads to errors like this during catalog compilation:

Error:
/Stage[main]/Auditd/Concat[/etc/audit/audit.rules]/Concat_file[/etc/audit/audit.rules]:
  Failed to generate additional resources using 'generate': Parameter
  alias failed on File[/etc/audit/audit.rules]: Munging failed for value
  ["audit-file"] in class alias: Cannot add aliases without a catalog

But there is no need to even use the alias metaparameter when the concat resource can just as easily be referenced by its resource name (i.e. $rules_file), so this change removes the alias metaparameter and updates the concat resource references to use the resource title.

This way the module is compatible with Puppet 5.

antaflos commented 6 years ago

The Travis tests are apparently broken, but not by my changes. Tests work fine locally.