X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fpostfix%2Fmanifests%2Finit.pp;h=4d5c31d120fc680e695e5e0633dcc758fe5c8fe9;hb=cd6ba3eb9c9a6c35386fb6c413f1dfb592934182;hp=88591a94d5738fe89c1221975e1e14e5690a2da4;hpb=974e0aee685ff9145505c98aea87de3ba07d96f3;p=mirror%2Fdsa-puppet.git diff --git a/modules/postfix/manifests/init.pp b/modules/postfix/manifests/init.pp index 88591a94d..4d5c31d12 100644 --- a/modules/postfix/manifests/init.pp +++ b/modules/postfix/manifests/init.pp @@ -1,16 +1,27 @@ +# postfix class +# @param use_smarthost use the smarthost +# @param smarthost host to relay through (if set and use_smarthost) class postfix( + Optional[String] $smarthost, + Boolean $use_smarthost = true, Boolean $manage_maincf = true, ) { package { 'postfix': ensure => installed } + if $use_smarthost { + if ! smarthost { + fail('No smarthost set but use_smarthost is true') + } + } else { + $heavy = true + } + service { 'postfix': ensure => running } - include debian_org::mail_incoming_port - munin::check { 'ps_exim4': ensure => absent } munin::check { 'exim_mailqueue': ensure => absent } munin::check { 'exim_mailstats': ensure => absent }