diff options
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 { |