We just came across an interesting bug in our environment.
We are running SLES 12 and we noticed first that rules weren't being picked up from /etc/auditd/rules.d/puppet.rules.
We changed the auditd::rules_file param to /etc/auditd/audit.rules and then encountered a bunch of warnings that said that /etc/auditd/rules.d/puppet.rules doesn't exist in the catalog!
This striked us as odd, and we think that the function is not correctly getting the hiera value that we provided to the module.
Please see my pull request, as I believe this fixes the issue, while retaining previous expected behaviors.
As an interesting side effect, I think that this would also allow people to specify a different target for different rules in hiera. Although I can't imagine why anyone would.
Hello!
We just came across an interesting bug in our environment.
We are running SLES 12 and we noticed first that rules weren't being picked up from
/etc/auditd/rules.d/puppet.rules
.We changed the
auditd::rules_file
param to/etc/auditd/audit.rules
and then encountered a bunch of warnings that said that/etc/auditd/rules.d/puppet.rules
doesn't exist in the catalog!This striked us as odd, and we think that the function is not correctly getting the hiera value that we provided to the module.
Please see my pull request, as I believe this fixes the issue, while retaining previous expected behaviors.
As an interesting side effect, I think that this would also allow people to specify a different target for different rules in hiera. Although I can't imagine why anyone would.