summaryrefslogtreecommitdiff
path: root/templates/client.erb
blob: 57417010fe7d8586eb1ca16e6c79f4076b861eb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<%
	# Downcase all information
	dom = scope.lookupvar('::domain').downcase
	h = scope.lookupvar('::hostname').downcase
%>

### Munin client from Puppet template
# Domain: <%= @dom %>
# Registered on: <%= @h %>
# Type: <%= @client_type %>
<% if @description != 'absent' -%>
# Description: <%= @description.gsub(/\n/, ' ') %>
<% end -%>
[<% if @group != 'absent' -%><%= @group %>;<% end -%><%= @fhost.downcase %>]
<% 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 -%>