From 2b4bde897d37c53ee88e68f71dff94d1d53a8aaf Mon Sep 17 00:00:00 2001 From: Joan Manel Calaseit Date: Thu, 11 Aug 2022 16:35:38 +0200 Subject: [PATCH] Custom rules template and manifest ammend --- manifests/customrule.pp | 4 ++-- templates/customrule.erb | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/manifests/customrule.pp b/manifests/customrule.pp index 17dc1dd..fc0b936 100644 --- a/manifests/customrule.pp +++ b/manifests/customrule.pp @@ -3,10 +3,10 @@ # Literal String set # define audit::customrule ( - $customrules [], + $customrules = [], ) { # - concat::fragment{ "${audit::params::audit_file} custom rule" + concat::fragment{ "${audit::params::audit_file} customrule ${name}": target => $audit::params::audit_file, order => '12', content => template("${module_name}/customrule.erb"), diff --git a/templates/customrule.erb b/templates/customrule.erb index 0dab1b8..4266fa8 100644 --- a/templates/customrule.erb +++ b/templates/customrule.erb @@ -1 +1,2 @@ -<% @customrules.each do |rule| %> <%= rule %><% end %> +<% @customrules.each do |rule| -%> +<%= rule %><% end -%>