Fix munin for UCL nodes with no internal address
authorTom Hughes <tom@compton.nu>
Wed, 25 Jun 2014 10:07:21 +0000 (11:07 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 25 Jun 2014 10:07:21 +0000 (11:07 +0100)
cookbooks/munin/templates/default/munin.conf.erb

index f204de2a0346c07045732d028a0ab61b90935569..4926a07f99e3b0b3ef9b223ec08d1fabb138632c 100644 (file)
@@ -17,7 +17,7 @@ unknown_limit 144
     update no
 <% end -%>
 <% if client[:networking][:roles][:external][:zone] == "ucl" -%>
     update no
 <% end -%>
 <% if client[:networking][:roles][:external][:zone] == "ucl" -%>
-    address <%= client.internal_ipaddress %>
+    address <%= client.internal_ipaddress || client.external_ipaddress %>
 <% elsif client[:networking][:roles][:external][:zone] == "ic" -%>
     address <%= client.internal_ipaddress || client.external_ipaddress %>
 <% elsif client.external_ipaddress -%>
 <% elsif client[:networking][:roles][:external][:zone] == "ic" -%>
     address <%= client.internal_ipaddress || client.external_ipaddress %>
 <% elsif client.external_ipaddress -%>