From 1bf60c5bdc530bcc68aa406db71c24aef5a3c820 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Mon, 17 Jun 2013 23:29:19 +0300 Subject: [PATCH] selinux: Notify setroubleshoot when config changes --- selinux/manifests/init.pp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/selinux/manifests/init.pp b/selinux/manifests/init.pp index 4e06339..b5fd6a0 100644 --- a/selinux/manifests/init.pp +++ b/selinux/manifests/init.pp @@ -84,6 +84,9 @@ class selinux::setroubleshoot($client_users=["*"], $mailto=undef) { hasstatus => true, require => Package["setroubleshoot"], } + $service = Service["setroubleshoot"] + } else { + $service = undef } $client_users_real = inline_template("<%= @client_users.join(',') %>") @@ -91,6 +94,7 @@ class selinux::setroubleshoot($client_users=["*"], $mailto=undef) { changes => "set access/client_users '${client_users_real}'", incl => "/etc/setroubleshoot/setroubleshoot.conf", lens => "Puppet.lns", + notify => $service, require => Package["setroubleshoot"], } @@ -102,6 +106,7 @@ class selinux::setroubleshoot($client_users=["*"], $mailto=undef) { changes => "set email/smtp_host '${mail_server}'", incl => "/etc/setroubleshoot/setroubleshoot.conf", lens => "Puppet.lns", + notify => $service, require => Package["setroubleshoot"], } file { "/var/lib/setroubleshoot/email_alert_recipients": @@ -110,6 +115,7 @@ class selinux::setroubleshoot($client_users=["*"], $mailto=undef) { owner => "root", group => "root", content => template("selinux/email_alert_recipients.erb"), + notify => $service, require => Augeas["set-setroubleshoot-smtp_host"], } }