From 6a41d00aebb4b6701229d2dca24ab0c0ce314a90 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 31 May 2013 09:19:01 +0000 Subject: [PATCH 1/1] fix type issues with munin.conf-per-node template --- modules/munin/templates/munin.conf-per-node.erb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/munin/templates/munin.conf-per-node.erb b/modules/munin/templates/munin.conf-per-node.erb index c7f39b625..421d0dd61 100644 --- a/modules/munin/templates/munin.conf-per-node.erb +++ b/modules/munin/templates/munin.conf-per-node.erb @@ -3,7 +3,12 @@ ## [<%= client_fqdn %>] -<%- if has_variable?('client_munin_async') and client_munin_async and client_munin_async == "true" %> +<% +# variables are different whether or not they go via the stored config thing. +# on the host that actually gets the config, client_munin_async is a String, saying "true", +# from other hosts it's an actual boolean, i.e. an instance of either FalseClass or TrueClass +%> +<%- if has_variable?('client_munin_async') and ((client_munin_async.kind_of?(String) and client_munin_async == "true") or (client_munin_async.kind_of?(TrueClass))) %> address ssh://munin-async@<%= client_fqdn %>/set-in-authkeys <%- else %> address <%= client_ipaddress %> -- 2.20.1