From 746ae8e2cd643c4285a79b132043195becc72802 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Thu, 6 Nov 2014 17:59:33 +0100 Subject: [PATCH] Handle hosts that are not in ldap yet --- modules/ferm/templates/defs.conf.erb | 1 + 1 file changed, 1 insertion(+) 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 -- 2.20.1