From 89c167f6d4dd26b43adde34e3dabc8cc4dfd0873 Mon Sep 17 00:00:00 2001 From: zenidd Date: Tue, 22 Dec 2020 10:43:59 +0100 Subject: [PATCH 1/2] manifests/reports: set concat target to manager_ossec.conf --- manifests/reports.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/reports.pp b/manifests/reports.pp index 1d8ab3c5..4f9699af 100644 --- a/manifests/reports.pp +++ b/manifests/reports.pp @@ -16,7 +16,7 @@ require wazuh::params_manager concat::fragment { $name: - target => 'ossec.conf', + target => 'manager_ossec.conf', order => 70, content => template('wazuh/fragments/_reports.erb') } From 0cc2e1c3bc8adebd4e10cebeabbc50f7d9dfc91d Mon Sep 17 00:00:00 2001 From: zenidd Date: Tue, 22 Dec 2020 11:16:27 +0100 Subject: [PATCH 2/2] manifests/reports.pp: add capabilitie to use multiple email targets --- manifests/reports.pp | 2 +- templates/fragments/_reports.erb | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/manifests/reports.pp b/manifests/reports.pp index 4f9699af..25f39a6d 100644 --- a/manifests/reports.pp +++ b/manifests/reports.pp @@ -9,7 +9,7 @@ Optional[String] $r_srcip = undef, Optional[String] $r_user = undef, String $r_title = '', - String $r_email_to = '', + $r_email_to = '', Optional[Enum['yes', 'no']] $r_showlogs = undef, ) { diff --git a/templates/fragments/_reports.erb b/templates/fragments/_reports.erb index 020e9224..e23fe40f 100644 --- a/templates/fragments/_reports.erb +++ b/templates/fragments/_reports.erb @@ -23,7 +23,11 @@ <%= @r_user %> <%- end -%> <%= @r_title %> - <%= @r_email_to %> + <% if @r_email_to != '' -%> + <% @r_email_to.each do |gr| -%> + <%= gr %> + <% end %> + <% end %> <%- if defined?(@r_showlogs) -%> <%= @r_showlogs %> <%- end -%>