Puppet Class: mailman::etclinks
- Defined in:
- manifests/etclinks.pp
Overview
Class: mailman::etclinks
A standard Mailman installation has only two parts.
-
Static bits (represented by PREFIX variable)
-
Dynamic bits (represented by VAR_PREFIX)
These are typically in /usr/ and /var/ respectively.
However, the Red Hat package maintainer wanted Mailman to fit the FHS more closely, so the Red Hat packages have changed the locations of some files since Mailman version 2.1.5.
In order to offer the best cross-platform support and ease of use, this module ignores the use of /etc/ on Red Hat and puts the files back into standard directories. But as a compromise, we can create some symlinks.
Examples
include mailman::etclinks
Authors
Nic Waller <code@nicwaller.com>
Copyright
Copyright 2013 Nic Waller, unless otherwise noted.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'manifests/etclinks.pp', line 28
class mailman::etclinks {
$mm_username = $mailman::params::mm_username
$mm_groupname = $mailman::params::mm_groupname
$mm_package = $mailman::params::mm_package
$etc_dir = '/etc/mailman'
file { $etc_dir:
ensure => directory,
owner => 'root',
group => $mm_groupname,
mode => '2775',
seltype => 'mailman_data_t',
require => Package[$mm_package],
}
file { "${etc_dir}/mm_cfg.py":
ensure => link,
target => "${mailman::prefix}/Mailman/mm_cfg.py",
require => File[$etc_dir],
}
file { "${etc_dir}/adm.pw":
ensure => link,
target => $mailman::site_pw_file,
require => File[$etc_dir],
}
file { "${etc_dir}/creator.pw":
ensure => link,
target => $mailman::creator_pw_file,
require => File[$etc_dir],
}
file { "${etc_dir}/aliases":
ensure => link,
target => "${mailman::data_dir}/aliases",
require => File[$etc_dir],
}
file { "${etc_dir}/aliases.db":
ensure => link,
target => "${mailman::data_dir}/aliases.db",
require => File[$etc_dir],
}
file { "${etc_dir}/virtual-mailman":
ensure => link,
target => "${mailman::data_dir}/virtual-mailman",
require => File[$etc_dir],
}
}
|