2012-10-26 14:48:53 -04:00
|
|
|
# == Class: mailman
|
|
|
|
#
|
|
|
|
class mailman($vhost_name=$::fqdn) {
|
2012-08-04 13:10:26 -05:00
|
|
|
|
|
|
|
include apache
|
2012-05-10 19:19:32 +00:00
|
|
|
|
2012-10-26 14:48:53 -04:00
|
|
|
package { 'mailman':
|
2012-05-10 19:19:32 +00:00
|
|
|
ensure => installed,
|
|
|
|
}
|
|
|
|
|
2012-08-04 13:10:26 -05:00
|
|
|
apache::vhost { $vhost_name:
|
2012-10-26 14:48:53 -04:00
|
|
|
port => 80,
|
|
|
|
docroot => '/var/www/',
|
2012-08-04 13:10:26 -05:00
|
|
|
priority => '50',
|
|
|
|
template => 'mailman/mailman.vhost.erb',
|
2012-05-10 19:19:32 +00:00
|
|
|
}
|
2012-08-04 13:10:26 -05:00
|
|
|
a2mod { 'rewrite':
|
2012-10-26 14:48:53 -04:00
|
|
|
ensure => present,
|
2012-07-05 12:14:36 -07:00
|
|
|
}
|
|
|
|
|
2012-10-26 14:48:53 -04:00
|
|
|
file { '/var/www/index.html':
|
|
|
|
ensure => present,
|
|
|
|
source => 'puppet:///modules/mailman/index.html',
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
replace => true,
|
|
|
|
mode => '0444',
|
|
|
|
require => Package['apache2'],
|
2012-06-06 12:08:25 -07:00
|
|
|
}
|
|
|
|
|
2012-05-10 19:19:32 +00:00
|
|
|
file { '/etc/mailman/mm_cfg.py':
|
2012-10-26 14:48:53 -04:00
|
|
|
ensure => present,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0444',
|
2012-05-10 19:19:32 +00:00
|
|
|
content => template('mailman/mm_cfg.py.erb'),
|
2012-10-26 14:48:53 -04:00
|
|
|
replace => true,
|
|
|
|
require => Package['mailman'],
|
2012-05-10 19:19:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
service { 'mailman':
|
2012-10-26 14:48:53 -04:00
|
|
|
ensure => running,
|
|
|
|
hasrestart => true,
|
|
|
|
hasstatus => false,
|
|
|
|
subscribe => File['/etc/mailman/mm_cfg.py'],
|
|
|
|
require => Package['mailman'],
|
2012-05-10 19:19:32 +00:00
|
|
|
}
|
|
|
|
|
2012-06-19 10:44:07 -07:00
|
|
|
file { '/etc/mailman/en':
|
2012-10-26 14:48:53 -04:00
|
|
|
ensure => directory,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'list',
|
|
|
|
mode => '0644',
|
2012-06-19 10:44:07 -07:00
|
|
|
recurse => true,
|
|
|
|
require => Package['mailman'],
|
2012-10-26 14:48:53 -04:00
|
|
|
source => 'puppet:///modules/mailman/html-templates-en',
|
2012-06-19 10:44:07 -07:00
|
|
|
}
|
2012-05-10 19:19:32 +00:00
|
|
|
}
|