]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/templates/default/munin.conf.erb
Fix munin for UCL nodes with no internal address
[chef.git] / cookbooks / munin / templates / default / munin.conf.erb
index 9bceccd257a6960576e1ea7e6e6833e6f8143864..4926a07f99e3b0b3ef9b223ec08d1fabb138632c 100644 (file)
@@ -17,10 +17,10 @@ unknown_limit 144
     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 %>
-<% else -%>
+<% elsif client.external_ipaddress -%>
     address <%= client.external_ipaddress %>
 <% end -%>
     use_node_name yes