summaryrefslogtreecommitdiff
path: root/templates/client.erb
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-04-17 16:36:37 -0400
committerMicah Anderson <micah@riseup.net>2013-04-17 16:36:37 -0400
commit8f7c0071eb82591477876eeb3f309067853a3261 (patch)
treeb095f01b960b7ba3699da2dfa4d84cd5bb8a6361 /templates/client.erb
parentea31faee76141646c173d88bd5bec5aa4a773c1c (diff)
parenta5ce0a9317fc5dd5228cff4c5b6d36366c17b6d5 (diff)
Merge branch 'master' into leap
Conflicts: README manifests/host/cgi.pp
Diffstat (limited to 'templates/client.erb')
-rw-r--r--templates/client.erb15
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 -%>
+