]> gitweb.fluxo.info Git - puppet-mail.git/commitdiff
Initial sympa configuration
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 12 Aug 2010 02:18:19 +0000 (23:18 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 12 Aug 2010 02:18:19 +0000 (23:18 -0300)
manifests/init.pp
manifests/packages.pp
manifests/sympa.pp [new file with mode: 0644]
manifests/system.pp
manifests/web.pp

index 2f32cfb275f6f0357236382005e735317f57b074..74abb214ad3d75ecb3ac96e311fcbad63746bc4a 100644 (file)
@@ -11,3 +11,4 @@ import "sasl.pp"
 import "tls.pp"
 import "amavisd.pp"
 import "web.pp"
+import "sympa.pp"
index 258336e395d43158e253b2b2f5301dbe38c4edeb..f99ff5a3fd43e4d94520c3acef470f371b307d0f 100644 (file)
@@ -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 (file)
index 0000000..ea6de43
--- /dev/null
@@ -0,0 +1,8 @@
+class mail::sympa {
+  #
+  # Database configuration
+  #
+  database::instance { "$sympa_database_name":
+    password => "$sympa_database_password",
+  }
+}
index 9338f86e21a4b001d520c2889ddb652274907048..86781addde42495a9eb52b7ceab0f15b1a752ac9 100644 (file)
@@ -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";
index 82ac85a49f125f75dca6210c3bf1c94bca52a146..a29ea8b28657b180c1048aeee6ace40c1160b967 100644 (file)
@@ -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,
+  }
+}