diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-08-11 23:18:19 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-08-11 23:18:19 -0300 |
commit | e22ccea7c79f1a43db3e9542228986d4e2eb847f (patch) | |
tree | 73d913437f5a154ba7acb1782a68d42b7c71c44b /manifests | |
parent | 60f6c76181ce20aa188df30d1b425f12a987c75c (diff) | |
download | puppet-mail-e22ccea7c79f1a43db3e9542228986d4e2eb847f.tar.gz puppet-mail-e22ccea7c79f1a43db3e9542228986d4e2eb847f.tar.bz2 |
Initial sympa configuration
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 1 | ||||
-rw-r--r-- | manifests/packages.pp | 6 | ||||
-rw-r--r-- | manifests/sympa.pp | 8 | ||||
-rw-r--r-- | manifests/system.pp | 18 | ||||
-rw-r--r-- | manifests/web.pp | 11 |
5 files changed, 44 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 2f32cfb..74abb21 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -11,3 +11,4 @@ import "sasl.pp" import "tls.pp" import "amavisd.pp" import "web.pp" +import "sympa.pp" diff --git a/manifests/packages.pp b/manifests/packages.pp index 258336e..f99ff5a 100644 --- a/manifests/packages.pp +++ b/manifests/packages.pp @@ -28,3 +28,9 @@ class mail::packages { ensure => absent, } } + +class mail::packages::sympa { + package { 'sympa': + ensure => installed, + } +} diff --git a/manifests/sympa.pp b/manifests/sympa.pp new file mode 100644 index 0000000..ea6de43 --- /dev/null +++ b/manifests/sympa.pp @@ -0,0 +1,8 @@ +class mail::sympa { + # + # Database configuration + # + database::instance { "$sympa_database_name": + password => "$sympa_database_password", + } +} diff --git a/manifests/system.pp b/manifests/system.pp index 9338f86..86781ad 100644 --- a/manifests/system.pp +++ b/manifests/system.pp @@ -46,6 +46,24 @@ class mail::system { include mail::postfixadmin include mail::web + # Mailing list manager + case $mail_sympa { + true: { + + case $sympa_database_password { + '': { fail("You need to define \$sympa_database_password host config") } + } + + case $sympa_database_name { + '': { $sympa_database_name= "sympa" } + } + + include mail::sympa + include mail::web::sympa + include mail::packages::sympa + } + } + # Postfix configuration postfix::config { "mydomain": value => "$domain"; diff --git a/manifests/web.pp b/manifests/web.pp index 82ac85a..a29ea8b 100644 --- a/manifests/web.pp +++ b/manifests/web.pp @@ -20,3 +20,14 @@ class mail::web inherits websites::setup { require => File["${apache_sites_folder}/postfixadmin/site"], } } + +class mail::web::sympa { + case $mail_list_domain { + '': { $mail_list_domain = 'lists' } + } + + apache::site { "$mail_list_domain": + docroot => "${apache_sites_folder}/$mail_list_domain/site", + source => true, + } +} |