summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2009-11-08 13:03:23 -0200
committerSilvio Rhatto <rhatto@riseup.net>2009-11-08 13:03:23 -0200
commit0bcb3aae2bed161823d7488c91b559a01304d7a5 (patch)
tree6b234bf0f7e0f3b179d40b17ad4aee7eed289125
parent409374291810e64918e4703db2c055af12701c45 (diff)
downloadpuppet-apache-0bcb3aae2bed161823d7488c91b559a01304d7a5.tar.gz
puppet-apache-0bcb3aae2bed161823d7488c91b559a01304d7a5.tar.bz2
Ensuring folders exist with right modes and ownership
-rw-r--r--manifests/init.pp8
1 files changed, 7 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 73852f1..3c6bcb5 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -42,6 +42,7 @@ class apache {
}
service { "apache":
+ name => "apache2",
ensure => running,
require => Package["apache"],
hasstatus => true,
@@ -73,7 +74,6 @@ class apache {
'': { $apache_www_folder = '/var/www' }
}
- # TODO: ensure folders exist with right modes and ownership
define site($ensure = present, $docroot = false, $redirect = false,
$protocol = 'http', $server_alias = false, $use = false) {
file { "${apache2_sites}-available/$title":
@@ -107,6 +107,12 @@ class apache {
&& [ ${apache2_sites}-enabled/$name -ef ${apache2_sites}-available/$name ]'",
notify => Exec["reload-apache2"],
}
+ file { "${docroot}":
+ ensure => directory,
+ owner => root,
+ group => root,
+ mode => 0755,
+ }
}
'absent': {
exec { "/usr/sbin/a2dissite $name":