Commit 6ee45796 authored by mh's avatar mh
Browse files

introduce wwwmail option to manage wwwmailers group

parent 896fed91
......@@ -7,6 +7,10 @@
# user_access:
# - sftp: an sftp only user will be created (*default*)
# - webdav: a webdav vhost will be created which will point to the webhostings root
# wwwmail:
# With a local user_provider this will include the web run user in a group called wwwmailers.
# This makes it easier to enable special rights on a webserver's mailserver to this group.
# - default: false
# ldap_user: Used if you have set user_provider to `ldap`
# - absent: $name will be passed
# - any: any authenticated ldap user will work
......@@ -29,6 +33,7 @@ define webhosting::common(
$run_uid = 'absent',
$run_uid_name = 'absent',
$run_gid = 'absent',
$wwwmail = false,
$nagios_check = 'ensure',
$nagios_check_domain = 'absent',
$nagios_check_url = '/',
......@@ -140,6 +145,19 @@ define webhosting::common(
}
}
if $wwwmail {
user::groups::manage_user{"${real_run_uid_name}_in_wwwmailers":
ensure => $ensure,
group => 'wwwmailers',
user => $real_run_uid_name
}
if ($ensure == 'present') {
require webhosting::wwwmailers
User::Groups::Manage_user["${real_run_uid_name}_in_wwwmailers"]{
require => User::Managed[$real_run_uid_name],
}
}
}
if ($ensure == 'present') {
User::Managed[$real_run_uid_name]{
gid => $real_run_gid,
......
......@@ -36,6 +36,7 @@ define webhosting::modperl(
$run_uid_name = 'absent',
$run_gid = 'absent',
$run_gid_name = 'absent',
$wwwmail = false,
$allow_override = 'None',
$do_includes = false,
$options = 'absent',
......@@ -79,6 +80,7 @@ define webhosting::modperl(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
wwwmail => $wwwmail,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......
......@@ -44,6 +44,7 @@ define webhosting::passenger(
$run_uid_name = 'absent',
$run_gid = 'absent',
$run_gid_name = 'absent',
$wwwmail = false,
$allow_override = 'None',
$do_includes = false,
$options = 'absent',
......@@ -103,6 +104,7 @@ define webhosting::passenger(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
wwwmail => $wwwmail,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......
......@@ -48,6 +48,7 @@ define webhosting::php(
$run_uid_name = 'absent',
$run_gid = 'absent',
$run_gid_name = 'absent',
$wwwmail = false,
$allow_override = 'None',
$do_includes = false,
$options = 'absent',
......@@ -107,6 +108,7 @@ define webhosting::php(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
wwwmail => $wwwmail,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......
......@@ -42,6 +42,7 @@ define webhosting::php::drupal(
$run_uid_name = 'absent',
$run_gid = 'absent',
$run_gid_name = 'absent',
$wwwmail = false,
$allow_override = 'None',
$do_includes = false,
$options = 'absent',
......@@ -92,6 +93,7 @@ define webhosting::php::drupal(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
wwwmail => $wwwmail,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......
......@@ -42,6 +42,7 @@ define webhosting::php::gallery2(
$run_uid_name = 'absent',
$run_gid = 'absent',
$run_gid_name = 'absent',
$wwwmail = false,
$allow_override = 'None',
$do_includes = false,
$options = 'absent',
......@@ -91,6 +92,7 @@ define webhosting::php::gallery2(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
wwwmail => $wwwmail,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......
......@@ -36,6 +36,7 @@ define webhosting::php::joomla(
$run_uid_name = 'absent',
$run_gid = 'absent',
$run_gid_name = 'absent',
$wwwmail = false,
$allow_override = 'None',
$do_includes = false,
$options = 'absent',
......@@ -84,6 +85,7 @@ define webhosting::php::joomla(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
wwwmail => $wwwmail,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......
......@@ -36,6 +36,7 @@ define webhosting::php::mediawiki(
$run_uid_name = 'absent',
$run_gid = 'absent',
$run_gid_name = 'absent',
$wwwmail = false,
$allow_override = 'FileInfo Limit',
$options = 'absent',
$additional_options = 'absent',
......@@ -94,6 +95,7 @@ define webhosting::php::mediawiki(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
wwwmail => $wwwmail,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......
......@@ -36,6 +36,7 @@ define webhosting::php::silverstripe(
$run_uid_name = 'absent',
$run_gid = 'absent',
$run_gid_name = 'absent',
$wwwmail = false,
$allow_override = 'None',
$do_includes = false,
$options = 'absent',
......@@ -85,6 +86,7 @@ define webhosting::php::silverstripe(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
wwwmail => $wwwmail,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......
......@@ -36,6 +36,7 @@ define webhosting::php::simplemachine(
$run_uid_name = 'absent',
$run_gid = 'absent',
$run_gid_name = 'absent',
$wwwmail = false,
$allow_override = 'FileInfo',
$do_includes = false,
$options = 'absent',
......@@ -85,6 +86,7 @@ define webhosting::php::simplemachine(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
wwwmail => $wwwmail,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......
......@@ -36,6 +36,7 @@ define webhosting::php::spip(
$run_uid_name = 'absent',
$run_gid = 'absent',
$run_gid_name = 'absent',
$wwwmail = false,
$allow_override = 'FileInfo',
$do_includes = false,
$options = 'absent',
......@@ -81,6 +82,7 @@ define webhosting::php::spip(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
wwwmail => $wwwmail,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......
......@@ -36,6 +36,7 @@ define webhosting::php::typo3(
$run_uid_name = 'absent',
$run_gid = 'absent',
$run_gid_name = 'absent',
$wwwmail = false,
$allow_override = 'None',
$do_includes = false,
$options = 'absent',
......@@ -85,6 +86,7 @@ define webhosting::php::typo3(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
wwwmail => $wwwmail,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......
......@@ -38,6 +38,7 @@ define webhosting::php::wordpress(
$run_uid_name = 'absent',
$run_gid = 'absent',
$run_gid_name = 'absent',
$wwwmail = false,
$allow_override = 'FileInfo',
$do_includes = false,
$options = 'absent',
......@@ -87,6 +88,7 @@ define webhosting::php::wordpress(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
wwwmail => $wwwmail,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......
class webhosting::wwwmailers {
group{'wwwmailers':
gid => 9999,
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment