we don't actually need to build an array and take it back apart
authorStephen Gran <steve@lobefin.net>
Sun, 21 Feb 2010 03:47:26 +0000 (03:47 +0000)
committerStephen Gran <steve@lobefin.net>
Sun, 21 Feb 2010 03:47:26 +0000 (03:47 +0000)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/named/templates/named.conf.acl.erb

index 83b945d..9d13352 100644 (file)
@@ -5,18 +5,14 @@
 
 acl Nagios {
        <%=
-  nagii = []
+  str = ''
   localinfo.keys.sort.each do |node|
       if localinfo[node]['nagiosmaster']
-            nagii << keyinfo[node][0]['ipHostNumber']
+            str += "\t" + keyinfo[node][0]['ipHostNumber'] + "/32;\n"
       end
   end
-  str = ''
-  nagii.each do |nag|
-    str += "\t" + nag + "/32;\n"
-  end
   str
-%>;
+%>
 
 };