diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-10-09 13:54:17 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-10-09 13:54:17 -0300 |
commit | a01d1686bb84ae1f2fb493080efc863f14389304 (patch) | |
tree | 857adee88a32146fa7e1df9c5d4588d1444b1cd8 | |
parent | 7709344579f694e4faa54abc4903b35482c8db47 (diff) | |
download | puppet-apache-a01d1686bb84ae1f2fb493080efc863f14389304.tar.gz puppet-apache-a01d1686bb84ae1f2fb493080efc863f14389304.tar.bz2 |
Managin docroot by default; parameter changes
-rw-r--r-- | manifests/init.pp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index a1391e3..df4fce7 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -102,8 +102,9 @@ class apache { $redirect_match = false, $protocol = 'http', $aliases = false, $server_alias = false, $use = false, $ticket = false, $source = false, $template = 'apache/site.erb', $filename = '', - $manage_docroot = false, $owner = '', $group = '', - $mpm = true, $password = '*', $comment = '', $sshkey = absent, + $manage_docroot = true, $owner = 'root', $group = 'root', + $mpm = true, $mpm_user = '', $mpm_group = '', $password = '*', + $comment = '', $sshkey = absent, $groups = '', $shell = '/bin/false') { $vhost = $filename ? { @@ -116,17 +117,17 @@ class apache { default => $base_domain, } - $user = $owner ? { - '' => $title, - default => $owner, - } + if $mpm == true and $user != 'root' { + $user = $mpm_user ? { + '' => $title, + default => $mpm_user, + } - $gid = $group ? { - '' => $title, - default => $group, - } + $gid = $mpm_group? { + '' => $title, + default => $mpm_group, + } - if $mpm == true and $user != 'root' { if !defined(User["$user"]) { user::manage { "$user": tag => "virtual", @@ -188,8 +189,8 @@ class apache { if !defined(File["${docroot}"]) { file { "${docroot}": ensure => present, - owner => $user, - group => $gid, + owner => $owner, + group => $group, mode => 0755, recurse => false, } |