diff options
Diffstat (limited to 'templates/client.erb')
-rw-r--r-- | templates/client.erb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/templates/client.erb b/templates/client.erb index 15e05c6..ba03da5 100644 --- a/templates/client.erb +++ b/templates/client.erb @@ -1,19 +1,24 @@ <% # Downcase all information - dom = domain.downcase - host = hostname.downcase + dom = scope.lookupvar('::domain').downcase + h = scope.lookupvar('::hostname').downcase %> ### Munin client from Puppet template # Domain: <%= dom %> -# Registered on: <%= host %> +# Registered on: <%= h %> # Type: <%= client_type %> <% if description != 'absent' -%> # Description: <%= description.gsub!(/\n/, ' ') %> <% end -%> [<%= fhost.downcase %>] - address <%= munin_host_real %> - port <%= munin_port_real %> +<% if use_ssh -%> + address ssh://<%= host %>/bin/nc localhost <%= port %> +<% else -%> + address <%= host %> + port <%= port %> +<% end -%> <% if config -%><% config.each do |val| -%> <%= val -%> <% end -%><% end -%> + |