summaryrefslogtreecommitdiff
path: root/manifests/web.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-22 14:15:41 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-22 14:15:41 -0200
commit0dce0e69ff64b8c98c0854c33be6886d433dedfb (patch)
treefa9cb2ea6dbf10f252668ad1772221a9a4b5cf57 /manifests/web.pp
parentc57525c03649a26d8691faf65295df8ee0a90acb (diff)
downloadpuppet-mail-0dce0e69ff64b8c98c0854c33be6886d433dedfb.tar.gz
puppet-mail-0dce0e69ff64b8c98c0854c33be6886d433dedfb.tar.bz2
Starting class refactoring for forward compatibility
Diffstat (limited to 'manifests/web.pp')
-rw-r--r--manifests/web.pp28
1 files changed, 9 insertions, 19 deletions
diff --git a/manifests/web.pp b/manifests/web.pp
index 16f4b25..065b44e 100644
--- a/manifests/web.pp
+++ b/manifests/web.pp
@@ -1,12 +1,8 @@
class mail::web::virtual(
- $database_user = hiera('postfixadmin_database_user', 'postfix'),
- $database_host = hiera('postfixadmin_database_host', 'localhost'),
- $database_name = hiera('postfixadmin_database_name', 'postfix'),
- $database_password = hiera('postfixadmin_database_password', ''),
- $postfixadmin_setup_hash = hiera('postfixadmin_setup_hash', ''),
- $roundcube_des_key = hiera('roundcube_des_key', ''),
- $roundcube_logo = hiera('roundcube_logo', 'null'),
- $roundcube_login_info = hiera('roundcube_login_info', false)
+ $postfixadmin_setup_hash = hiera('mail::web::virtual::postfixadmin_setup_hash', ''),
+ $roundcube_des_key = hiera('mail::web::virtual::roundcube_des_key', ''),
+ $roundcube_logo = hiera('mail::web::virtual::roundcube_logo', 'null'),
+ $roundcube_login_info = hiera('mail::web::virtual::roundcube_login_info', false)
) {
# Class configuration
@@ -16,10 +12,6 @@ class mail::web::virtual(
}
}
- case $database_password {
- '': { fail("You need to define database_password host config") }
- }
-
case $postfixadmin_setup_hash {
'': {
warning("You need to define postfixadmin_setup_hash host config")
@@ -81,10 +73,8 @@ class mail::web::virtual(
}
class mail::web::sympa inherits websites::setup {
- $sympa_subdomain = hiera('sympa_subdomain', 'lists')
-
- apache::site { "$sympa_subdomain":
- docroot => "${apache::www_folder}/${sympa_subdomain}",
+ apache::site { "${sympa::subdomain}":
+ docroot => "${apache::www_folder}/${sympa::subdomain}",
source => true,
owner => sympa,
group => sympa,
@@ -105,13 +95,13 @@ class mail::web::sympa inherits websites::setup {
require => Package["apache2-suexec"],
}
- file { "${apache::www_folder}/${sympa_subdomain}/wwsympa.fcgi":
+ file { "${apache::www_folder}/${sympa::subdomain}/wwsympa.fcgi":
ensure => present,
owner => sympa,
group => sympa,
mode => 0550,
content => "#!/bin/sh\n/usr/lib/cgi-bin/sympa/wwsympa.fcgi\n",
- require => File["${apache::www_folder}/${sympa_subdomain}"],
+ require => File["${apache::www_folder}/${sympa::subdomain}"],
}
}
@@ -128,7 +118,7 @@ class mail::web::sympa::disabled inherits mail::web::sympa {
class mail::web::mlmmj inherits websites::setup {
$mlmmj_subdomain = hiera('mlmmj_subdomain')
- apache::site { "$mlmmj_subdomain":
+ apache::site { "${mail::mlmmj::subdomain}":
docroot => "/usr/share/mlmmj-php-web-admin",
owner => 'mlmmj',
group => 'mlmmj',