From 611ba6ca2955c56a381e4b26651e01ffa80560bc Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Mon, 20 Nov 2023 08:58:31 +0100 Subject: [PATCH] fix SELinux context of Redmine logs so that logrotate works Fixes: #1989 --- puppet/modules/redmine/manifests/init.pp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/puppet/modules/redmine/manifests/init.pp b/puppet/modules/redmine/manifests/init.pp index 6c77dbddc..21bcd12c7 100644 --- a/puppet/modules/redmine/manifests/init.pp +++ b/puppet/modules/redmine/manifests/init.pp @@ -269,4 +269,12 @@ content => file('redmine/logrotate'), } + if $facts['os']['selinux']['enabled'] { + include selinux + + selinux::fcontext { 'fcontext-redmine-log': + seltype => 'var_log_t', + pathspec => "${app_root}/log(/.*)?", + } + } }