summaryrefslogtreecommitdiff
path: root/manifests/sympa
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-22 14:56:59 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-22 14:56:59 -0200
commitbeb9ced0191a9c6804332bd741ba30d4eee0040a (patch)
treee9513f0f4d5f77f1a2702b1a91bb65233ed88951 /manifests/sympa
parent0dce0e69ff64b8c98c0854c33be6886d433dedfb (diff)
downloadpuppet-mail-beb9ced0191a9c6804332bd741ba30d4eee0040a.tar.gz
puppet-mail-beb9ced0191a9c6804332bd741ba30d4eee0040a.tar.bz2
Major refactor
Diffstat (limited to 'manifests/sympa')
-rw-r--r--manifests/sympa/disabled.pp56
-rw-r--r--manifests/sympa/packages.pp5
-rw-r--r--manifests/sympa/web.pp32
-rw-r--r--manifests/sympa/web/disabled.pp9
4 files changed, 102 insertions, 0 deletions
diff --git a/manifests/sympa/disabled.pp b/manifests/sympa/disabled.pp
new file mode 100644
index 0000000..b81ce98
--- /dev/null
+++ b/manifests/sympa/disabled.pp
@@ -0,0 +1,56 @@
+class mail::sympa::disabled inherits mail::sympa {
+ include mail::web::sympa::disabled
+
+ Service["sympa"] {
+ ensure => stopped,
+ enable => false,
+ }
+
+ Cron["sympa-restart"] {
+ ensure => absent,
+ }
+
+ Postfix::Transport_regexp_snippet['sympa_transport_regexp'] {
+ content => undef,
+ }
+
+ Postfix::Virtual_regexp_snippet['sympa_virtual_regexp'] {
+ content => undef,
+ }
+
+ Mailalias["sympa"] {
+ ensure => absent,
+ }
+
+ Mailalias["sympa-request"] {
+ ensure => absent,
+ }
+
+ Mailalias["sympa-owner"] {
+ ensure => absent,
+ }
+
+ Mailalias["abuse-feedback-report"] {
+ ensure => absent,
+ }
+
+ Mailalias["bounce+*"] {
+ ensure => absent,
+ }
+
+ Mailalias["listserv"] {
+ ensure => absent,
+ }
+
+ Mailalias["listserv-request"] {
+ ensure => absent,
+ }
+
+ Mailalias["listserv-owner"] {
+ ensure => absent,
+ }
+
+ Mailalias["majordomo"] {
+ ensure => absent,
+ }
+}
diff --git a/manifests/sympa/packages.pp b/manifests/sympa/packages.pp
new file mode 100644
index 0000000..4a90727
--- /dev/null
+++ b/manifests/sympa/packages.pp
@@ -0,0 +1,5 @@
+class mail::sympa::packages {
+ package { 'sympa':
+ ensure => installed,
+ }
+}
diff --git a/manifests/sympa/web.pp b/manifests/sympa/web.pp
new file mode 100644
index 0000000..a174e62
--- /dev/null
+++ b/manifests/sympa/web.pp
@@ -0,0 +1,32 @@
+class mail::sympa::web inherits websites::setup {
+ apache::site { "${sympa::subdomain}":
+ docroot => "${apache::www_folder}/${sympa::subdomain}",
+ source => true,
+ owner => sympa,
+ group => sympa,
+ mpm => false,
+ }
+
+ package { [ 'apache2-suexec', 'libapache2-mod-fcgid' ]:
+ ensure => present,
+ }
+
+ apache::module { "fcgid":
+ ensure => present,
+ require => Package["libapache2-mod-fcgid"],
+ }
+
+ apache::module { "suexec":
+ ensure => present,
+ require => Package["apache2-suexec"],
+ }
+
+ 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}"],
+ }
+}
diff --git a/manifests/sympa/web/disabled.pp b/manifests/sympa/web/disabled.pp
new file mode 100644
index 0000000..1d34641
--- /dev/null
+++ b/manifests/sympa/web/disabled.pp
@@ -0,0 +1,9 @@
+class mail::sympa::web::disabled inherits mail::web::sympa {
+ Apache::Site["$sympa_subdomain"] {
+ ensure => absent,
+ }
+
+ File["${apache::www_folder}/${sympa_subdomain}/wwsympa.fcgi"] {
+ require => undef,
+ }
+}