From: Peter Palfrader Date: Sat, 21 Sep 2019 16:18:59 +0000 (+0200) Subject: Remove smarthost_port from nodeinfo X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=commitdiff_plain;h=404edcd3bddf15af30b55ff0d76eb2e2d9f5a970 Remove smarthost_port from nodeinfo --- diff --git a/modules/exim/manifests/init.pp b/modules/exim/manifests/init.pp index a76653ea2..fec2db555 100644 --- a/modules/exim/manifests/init.pp +++ b/modules/exim/manifests/init.pp @@ -4,6 +4,7 @@ class exim ( Boolean $is_rtmaster = false, Boolean $is_packagesmaster = false, Boolean $is_packagesqamaster = false, + Integer $smarthost_port = 587, ) { include exim::vdomain::setup include debian_org::mail_incoming_port diff --git a/modules/exim/templates/eximconf.erb b/modules/exim/templates/eximconf.erb index bea1faaab..c8be35121 100644 --- a/modules/exim/templates/eximconf.erb +++ b/modules/exim/templates/eximconf.erb @@ -229,7 +229,7 @@ if not scope.lookupvar('deprecated::nodeinfo')['mail_port'].to_s.empty? end if @is_mailrelay - ports << scope.lookupvar('deprecated::nodeinfo')['smarthost_port'] + ports << @smarthost_port end out += ports.uniq.sort.join(" : ") @@ -1577,24 +1577,17 @@ remote_smtp: tls_certificate = /etc/exim4/ssl/thishost.crt tls_privatekey = /etc/exim4/ssl/thishost.key -<%= -out = "" -if not scope.lookupvar('deprecated::nodeinfo')['smarthost'].empty? -out = ' +<%- if not scope.lookupvar('deprecated::nodeinfo')['smarthost'].empty? -%> remote_smtp_smarthost: debug_print = "T: remote_smtp_smarthost for $local_part@$domain" driver = smtp delay_after_cutoff = false - port = ' - out += scope.lookupvar('deprecated::nodeinfo')['smarthost_port'].to_s + "\n" - out += ' tls_tempfail_tryclear = false + port = <%= @marthost_port -%> + tls_tempfail_tryclear = false hosts_require_tls = ' + scope.lookupvar('deprecated::nodeinfo')['smarthost'] + ' tls_certificate = /etc/exim4/ssl/thishost.crt tls_privatekey = /etc/exim4/ssl/thishost.key -' -end -out -%> +<%- end -%> # Send the message to procmail procmail_pipe: driver = pipe diff --git a/modules/puppetmaster/lib/puppet/parser/functions/yamlinfo.rb b/modules/puppetmaster/lib/puppet/parser/functions/yamlinfo.rb index 42a47959a..5839b7518 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/yamlinfo.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/yamlinfo.rb @@ -26,7 +26,6 @@ module Puppet::Parser::Functions results['mail_port'] = '' results['smarthost'] = '' results['heavy_exim'] = '' - results['smarthost_port'] = 587 if yaml['host_settings'].kind_of?(Hash) yaml['host_settings'].each_pair do |property, values|