Make it possible to inject custom config files to be included in custom order for Dovecot v2.x.

Maybe this can replace the 99-local.conf in near future?
This commit is contained in:
Ossi Herrala 2012-12-11 14:35:43 +00:00
parent f254f1a33d
commit 6deadc4369
2 changed files with 45 additions and 0 deletions

View file

@ -1,4 +1,39 @@
# Install custom config to Dovecot
#
# === Parameters
#
# $name:
# Config name.
#
# $idx:
# Config load order. Defaults to 99.
#
# === Sample usage
#
# ldap::server::schema { "passdb-pam": idx => 09 }
#
define dovecot::server::config($idx = 90) {
include dovecot::server::v2
file { "${name}.conf":
ensure => present,
path => "/etc/dovecot/conf.d/${idx}-${name}.conf",
source => [ "puppet:///files/dovecot/${name}.conf",
"puppet:///modules/dovecot/${name}.conf", ],
mode => "0644",
owner => "root",
group => $::operatingsystem ? {
"openbsd" => "wheel",
default => "root",
},
notify => Service["dovecot"],
require => Package["dovecot"],
}
}
class dovecot::server::v2 {
case $operatingsystem {
centos,fedora: {