diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2009-11-08 13:03:23 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2009-11-08 13:03:23 -0200 |
commit | 0bcb3aae2bed161823d7488c91b559a01304d7a5 (patch) | |
tree | 6b234bf0f7e0f3b179d40b17ad4aee7eed289125 /manifests | |
parent | 409374291810e64918e4703db2c055af12701c45 (diff) | |
download | puppet-apache-0bcb3aae2bed161823d7488c91b559a01304d7a5.tar.gz puppet-apache-0bcb3aae2bed161823d7488c91b559a01304d7a5.tar.bz2 |
Ensuring folders exist with right modes and ownership
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 8 |
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": |