diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-08-26 11:31:22 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-08-26 11:31:22 -0300 |
commit | db85b89742382894cb5736fa6a654e92dc92bf20 (patch) | |
tree | fa3e27e1b01b11c785490a08c9399f6ccedfb7e4 /manifests/sympa.pp | |
parent | 012f17f3f9acf8fc6f18a832715a751e379693ca (diff) | |
download | puppet-mail-db85b89742382894cb5736fa6a654e92dc92bf20.tar.gz puppet-mail-db85b89742382894cb5736fa6a654e92dc92bf20.tar.bz2 |
Major refactor to enhance per-subsystem config isolation
Diffstat (limited to 'manifests/sympa.pp')
-rw-r--r-- | manifests/sympa.pp | 50 |
1 files changed, 35 insertions, 15 deletions
diff --git a/manifests/sympa.pp b/manifests/sympa.pp index 78ec9e4..18e8c9a 100644 --- a/manifests/sympa.pp +++ b/manifests/sympa.pp @@ -1,4 +1,33 @@ -class mail::sympa { +class mail::sympa inherits mail::regexps { + # Sympa subsystems + include mail::web::sympa + include mail::packages::sympa + + # Class configuration + case $sympa_database_password { + '': { fail("You need to define \$sympa_database_password host config") } + } + + case $sympa_database_name { + '': { $sympa_database_name= "sympa" } + } + + case $sympa_database_host { + '': { $sympa_database_host = "localhost" } + } + + case $sympa_subdomain { + '': { $sympa_subdomain = "lists" } + } + + case $sympa_listmasters { + '': { $sympa_listmasters = "listmaster@${fqdn}" } + } + + case $sympa_lang { + '': { $sympa_lang = "en_US" } + } + # # Database configuration # @@ -30,24 +59,15 @@ class mail::sympa { mode => 0640, content => template('mail/sympa/sympa.conf.erb'), require => [ File['/etc/sympa'], User['sympa'] ], + notify => Service['apache'], } - file { "/etc/postfix/transport_regexp": - ensure => present, - owner => root, - group => root, - mode => 0644, - content => template('mail/postfix/transport_regexp.erb'), - notify => Service['postfix'], + File["/etc/postfix/transport_regexp"] { + content => template('mail/postfix/sympa/transport_regexp.erb'), } - file { "/etc/postfix/virtual_regexp": - ensure => present, - owner => root, - group => root, - mode => 0644, - content => template('mail/postfix/virtual_regexp.erb'), - notify => Service['postfix'], + File["/etc/postfix/virtual_regexp"] { + content => template('mail/postfix/sympa/virtual_regexp.erb'), } postfix::config { |