module-postfix/manifests/definitions/config.pp
Francois Deppierraz 29c3c8519c postix-ng -> postfix
find . -type f -exec perl -pi -e 's/postfix-ng/postfix/' {} \;
2009-03-02 12:29:31 +01:00

18 lines
581 B
Puppet

define postfix::config ($ensure = present, $value, $nonstandard = false) {
case $ensure {
present: {
exec {"postconf -e ${name}='${value}'":
unless => $nonstandard ? {
false => "test \"x$(postconf -h ${name})\" == 'x${value}'",
true => "test \"x$(egrep '^${name} ' /etc/postfix/main.cf | cut -d= -f2 | cut -d' ' -f2)\" == 'x${value}'",
},
notify => Service["postfix"],
require => File["/etc/postfix/main.cf"],
}
}
absent: {
fail "postfix::config ensure => absent: Not implemented"
}
}
}