diff --git a/manifests/files.pp b/manifests/files.pp index 03e44bacc785cd7c061d1bec11184fc42666c782..d765032c278f69a88c2fc30defbc2ee8e5bdd4a9 100644 --- a/manifests/files.pp +++ b/manifests/files.pp @@ -37,15 +37,22 @@ class postfix::files { } # Config files + if $postfix::mastercf_source { + $mastercf_content = undef + } else { + $mastercf_content = template( + $postfix::params::master_os_template, + "${module_name}/master.cf.common.erb" + ) + } + file { '/etc/postfix/master.cf': ensure => present, owner => 'root', group => 'root', mode => '0644', - content => template( - $postfix::params::master_os_template, - "${module_name}/master.cf.common.erb" - ), + source => $postfix::mastercf_source, + content => $mastercf_content, seltype => $postfix::params::seltype, } @@ -55,7 +62,7 @@ class postfix::files { owner => 'root', group => 'root', mode => '0644', - source => "puppet:///modules/${module_name}/main.cf", + source => $postfix::maincf_source, replace => false, seltype => $postfix::params::seltype, } diff --git a/manifests/init.pp b/manifests/init.pp index 447881f590361942aba5a7acafc3ba3f5d355bef..a6b596486c476f4bad061040d0ca63a3c3669525 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -52,6 +52,8 @@ class postfix ( $inet_interfaces = 'all', $mail_user = 'vmail', # postfix_mail_user $mailman = false, + $maincf_source = "puppet:///modules/${module_name}/main.cf", + $mastercf_source = undef, $master_smtp = undef, # postfix_master_smtp $master_smtps = undef, # postfix_master_smtps $master_submission = undef, # postfix_master_submission