From: Peter Palfrader Date: Thu, 6 Nov 2014 16:59:33 +0000 (+0100) Subject: Handle hosts that are not in ldap yet X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=746ae8e2cd643c4285a79b132043195becc72802;p=mirror%2Fdsa-puppet.git Handle hosts that are not in ldap yet --- diff --git a/modules/ferm/templates/defs.conf.erb b/modules/ferm/templates/defs.conf.erb index ebaf9e4a1..a99f279b5 100644 --- a/modules/ferm/templates/defs.conf.erb +++ b/modules/ferm/templates/defs.conf.erb @@ -27,6 +27,7 @@ %w{mailrelay nagiosmaster extranrpeclient muninmaster dbmaster static_mirror static_source static_master dns_geo postgres_backup_server}.each do |role| rolehost[role] = [] roles[role].each do |node| + next unless allnodeinfo.has_key(node) and allnodeinfo[node].has_key?('ipHostNumber') rolehost[role] << allnodeinfo[node]['ipHostNumber'] end rolehost[role].flatten!.sort.uniq