From 16edba6c5f0a124025c05a00e03e7d4ce131a1a1 Mon Sep 17 00:00:00 2001 From: Elizabeth Krumbach Date: Wed, 17 Jul 2013 15:13:58 -0700 Subject: [PATCH] Fix restorecon exec on /var/lib/git The restorecon command for selinux needed to require /var/lib/git and the syntax is actually "File" rather than "Folder" here. Also added refreshonly so it only runs when /var/lib/git changes. Change-Id: I88f40dc3051d66ef9f9dc4d667474b8cc7d2a5f7 --- modules/cgit/manifests/init.pp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/cgit/manifests/init.pp b/modules/cgit/manifests/init.pp index ee097b1872..a3ae155314 100644 --- a/modules/cgit/manifests/init.pp +++ b/modules/cgit/manifests/init.pp @@ -51,11 +51,14 @@ class cgit { owner => 'cgit', group => 'cgit', mode => '0644', + require => User['cgit'], } exec { 'restorecon -R -v /var/lib/git': - path => '/sbin', - subscribe => Folder['/var/lib/git'] + path => '/sbin', + require => File['/var/lib/git'], + subscribe => File['/var/lib/git'], + refreshonly => true, } selboolean { 'httpd_enable_cgi':