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:
parent
f254f1a33d
commit
6deadc4369
2 changed files with 45 additions and 0 deletions
|
@ -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: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue