From 2bae6aa65f81d64b82c5a4dd74743e11100f3c20 Mon Sep 17 00:00:00 2001 From: andreas Date: Tue, 17 Feb 2009 18:49:44 +0000 Subject: add mode to defines; less permissions for the .git dir --- manifests/defines/vhost_files.pp | 17 +++++++++++++++++ manifests/defines/vhost_varieties.pp | 9 +++++++++ 2 files changed, 26 insertions(+) (limited to 'manifests') diff --git a/manifests/defines/vhost_files.pp b/manifests/defines/vhost_files.pp index 12de2ef..5a336cf 100644 --- a/manifests/defines/vhost_files.pp +++ b/manifests/defines/vhost_files.pp @@ -279,4 +279,21 @@ define apache::vhost::file::documentrootfile( } } +define apache::vhost::file::documentrootdir( + $documentroot, + $filename, + $thedomain, + $owner='root', + $group='0', + $mode=440 + ){ + file{"$documentroot/$filename": + ensure => directory, + mode => $mode, + owner => $owner, + group => $group, + require => Apache::Vhost::Webdir["$thedomain"], + } +} + diff --git a/manifests/defines/vhost_varieties.pp b/manifests/defines/vhost_varieties.pp index fe526fe..e5e180b 100644 --- a/manifests/defines/vhost_varieties.pp +++ b/manifests/defines/vhost_varieties.pp @@ -299,6 +299,15 @@ define apache::vhost::php::joomla( thedomain => $name, owner => $documentroot_owner, group => $documentroot_group, + mode => 440, + } + apache::vhost::file::documentrootdir{"joomlagitdir": + documentroot => $documentroot, + filename => '.git', + thedomain => $name, + owner => $documentroot_owner, + group => 'root', + mode => 400, } } -- cgit v1.2.3