summaryrefslogtreecommitdiff
path: root/manifests/web.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/web.pp')
-rw-r--r--manifests/web.pp169
1 files changed, 0 insertions, 169 deletions
diff --git a/manifests/web.pp b/manifests/web.pp
deleted file mode 100644
index 065b44e..0000000
--- a/manifests/web.pp
+++ /dev/null
@@ -1,169 +0,0 @@
-class mail::web::virtual(
- $postfixadmin_setup_hash = hiera('mail::web::virtual::postfixadmin_setup_hash', ''),
- $roundcube_des_key = hiera('mail::web::virtual::roundcube_des_key', ''),
- $roundcube_logo = hiera('mail::web::virtual::roundcube_logo', 'null'),
- $roundcube_login_info = hiera('mail::web::virtual::roundcube_login_info', false)
-) {
-
- # Class configuration
- if $::lsbdistcodename != 'lenny' {
- case $roundcube_des_key {
- '': { fail("You need to define roundcube_des_key host config") }
- }
- }
-
- case $postfixadmin_setup_hash {
- '': {
- warning("You need to define postfixadmin_setup_hash host config")
- $setup_hash = 'changeme'
- }
- }
-
- include php::imap
- include websites::setup
-
- apache::site { "postfixadmin":
- docroot => "${apache::sites_folder}/postfixadmin/site",
- use => [ "Site postfixadmin" ],
- mpm => false,
- }
-
- apache::site { "mail":
- docroot => $::lsbdistcodename ? {
- 'lenny' => "/usr/share/squirrelmail",
- default => "/var/lib/roundcube",
- },
- source => true,
- mpm => false,
- }
-
- file { "${apache::sites_folder}/postfixadmin/site/config.inc.php":
- ensure => present,
- owner => www-data,
- group => root,
- mode => 0640,
- content => template('mail/postfixadmin/config.inc.php.erb'),
- require => File["${apache::sites_folder}/postfixadmin/site"],
- }
-
- file { "/etc/roundcube/main.inc.php":
- ensure => $::lsbdistcodename ? {
- 'lenny' => absent,
- default => present,
- },
- owner => root,
- group => www-data,
- mode => 0640,
- content => template('mail/roundcube/main.inc.php.erb'),
- require => Package['roundcube'],
- }
-
- file { "/var/lib/roundcube/plugins/login_info":
- ensure => $::lsbdistcodename ? {
- 'lenny' => absent,
- default => directory,
- },
- recurse => true,
- owner => root,
- group => root,
- mode => 0644,
- source => "puppet:///modules/mail/roundcube/plugins/login_info",
- require => Package['roundcube'],
- }
-}
-
-class mail::web::sympa 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}"],
- }
-}
-
-class mail::web::sympa::disabled inherits mail::web::sympa {
- Apache::Site["$sympa_subdomain"] {
- ensure => absent,
- }
-
- File["${apache::www_folder}/${sympa_subdomain}/wwsympa.fcgi"] {
- require => undef,
- }
-}
-
-class mail::web::mlmmj inherits websites::setup {
- $mlmmj_subdomain = hiera('mlmmj_subdomain')
-
- apache::site { "${mail::mlmmj::subdomain}":
- docroot => "/usr/share/mlmmj-php-web-admin",
- owner => 'mlmmj',
- group => 'mlmmj',
- mpm_user => 'mlmmj',
- mpm_group => 'mlmmj',
- manage_user => false,
- require => Package['mlmmj-php-web-admin'],
- }
-
- package { [ 'mlmmj-php-web', 'mlmmj-php-web-admin' ]:
- ensure => present,
- }
-
- file { '/etc/mlmmj-php-web-admin':
- ensure => directory,
- owner => mlmmj,
- group => mlmmj,
- mode => 0640,
- }
-
- file { '/etc/mlmmj-php-web-admin/htpasswd':
- ensure => present,
- owner => mlmmj,
- group => mlmmj,
- mode => 0640,
- source => [ "puppet:///modules/site_mail/mlmmj/htpasswd",
- "puppet:///modules/mail/mlmmj/htpasswd" ],
- }
-}
-
-class mail::web::mlmmj::disabled inherits mail::web::mlmmj {
- Apache::Site["$mlmmj_subdomain"] {
- ensure => absent,
- }
-
- Package[ 'mlmmj-php-web', 'mlmmj-php-web-admin' ] {
- ensure => absent,
- }
-
- File['/etc/mlmmj-php-web-admin'] {
- ensure => absent,
- force => true,
- }
-
- File['/etc/mlmmj-php-web-admin/htpasswd'] {
- ensure => absent,
- }
-}