From d379b937122a597d44e2fb6b6f3dc41d9ab6af49 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Fri, 17 Jul 2015 16:55:04 -0700 Subject: [PATCH] Ensure cgit dir is created after parent directory In the default case, the cgit directory is /var/www/cgit. The parent directory, /var/www, is created by the apache package. If the package has not yet been installed, the file resource will fail with: Error: Cannot create /var/www/cgit; parent directory /var/www does not exist This package fixes the issue by adding a require relationship between the apache package and the cgit directory. The Package['httpd'] resource is declared in the apache class, which is included at the top of this manifest. Change-Id: Ifba16ee06ed485b539c576e53a68450fad6706d3 --- manifests/init.pp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 6f13a39..a2d5d5d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -166,10 +166,11 @@ class cgit( } file { $cgitdir: - ensure => directory, - owner => 'root', - group => 'root', - mode => '0755', + ensure => directory, + owner => 'root', + group => 'root', + mode => '0755', + require => Package['httpd'] } file { $staticfiles: