From: Stephen Gran Date: Wed, 6 May 2009 23:14:33 +0000 (+0100) Subject: Pull the information out of the yaml file so we don't have to restart X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=e47ce1f1dcdac0f11cae0aff10e79ca64589ed37;p=mirror%2Fdsa-puppet.git Pull the information out of the yaml file so we don't have to restart puppetmaster to move a service Signed-off-by: Stephen Gran --- diff --git a/files/etc/puppet/lib/puppet/parser/functions/nodeinfo.rb b/files/etc/puppet/lib/puppet/parser/functions/nodeinfo.rb index 02c9e6173..91255b218 100644 --- a/files/etc/puppet/lib/puppet/parser/functions/nodeinfo.rb +++ b/files/etc/puppet/lib/puppet/parser/functions/nodeinfo.rb @@ -21,11 +21,21 @@ module Puppet::Parser::Functions end end - results['bugsmaster'] = host == 'rietz.debian.org' - results['qamaster'] = host == 'merkel.debian.org' - results['mailrelay'] = host == 'spohr.debian.org' - results['rtmaster'] = host == 'spohr.debian.org' - results['packagesmaster'] = host == 'powell.debian.org' + if yaml.has_key?('services') + ['bugsmaster', 'qamaster', 'mailrelay', 'rtmaster', 'packagesmaster'].each do |service| + if yaml['services'].has_key?(service) + results[service] = host == yaml['services'][service] + end + end + end + + if yaml.has_key?('need_smarthost') and yaml['need_smarthost'].include?(host) + results['smarthost'] = "mailout.debian.org" + results['smarthost_port'] = 587 + else + results['smarthost'] = '' + results['smarthost_port'] = '' + end results['reservedaddrs'] = case host when "ball.debian.org"