From 02a8971459a201b9165909593c250122b0c06c1b Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 3 Jun 2013 14:24:20 +0200 Subject: Use @var style for puppet 3.2 compatibility --- templates/client.erb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'templates/client.erb') diff --git a/templates/client.erb b/templates/client.erb index ba03da5..83d5a64 100644 --- a/templates/client.erb +++ b/templates/client.erb @@ -5,20 +5,20 @@ %> ### Munin client from Puppet template -# Domain: <%= dom %> -# Registered on: <%= h %> -# Type: <%= client_type %> -<% if description != 'absent' -%> -# Description: <%= description.gsub!(/\n/, ' ') %> +# Domain: <%= @dom %> +# Registered on: <%= @h %> +# Type: <%= @client_type %> +<% if @description != 'absent' -%> +# Description: <%= @description.gsub!(/\n/, ' ') %> <% end -%> -[<%= fhost.downcase %>] -<% if use_ssh -%> - address ssh://<%= host %>/bin/nc localhost <%= port %> +[<%= @fhost.downcase %>] +<% if @use_ssh -%> + address ssh://<%= @host %>/bin/nc localhost <%= @port %> <% else -%> - address <%= host %> - port <%= port %> + address <%= @host %> + port <%= @port %> <% end -%> -<% if config -%><% config.each do |val| -%> - <%= val -%> +<% if @config -%><% @config.each do |val| -%> + <%= @val -%> <% end -%><% end -%> -- cgit v1.2.3 From 695d81c81cd152b5dd7333d0eae2bd6df108a41e Mon Sep 17 00:00:00 2001 From: Arjen Heidinga Date: Fri, 31 Jan 2014 09:52:10 +0100 Subject: Add support for setting the descryption and group support --- templates/client.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/client.erb') diff --git a/templates/client.erb b/templates/client.erb index 83d5a64..5741701 100644 --- a/templates/client.erb +++ b/templates/client.erb @@ -9,9 +9,9 @@ # Registered on: <%= @h %> # Type: <%= @client_type %> <% if @description != 'absent' -%> -# Description: <%= @description.gsub!(/\n/, ' ') %> +# Description: <%= @description.gsub(/\n/, ' ') %> <% end -%> -[<%= @fhost.downcase %>] +[<% if @group != 'absent' -%><%= @group %>;<% end -%><%= @fhost.downcase %>] <% if @use_ssh -%> address ssh://<%= @host %>/bin/nc localhost <%= @port %> <% else -%> -- cgit v1.2.3 From b5cc9427aeca48689913b7462e58dd905c4a788b Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 3 Feb 2014 14:57:03 +0100 Subject: cleanup some of the missing parts --- templates/client.erb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'templates/client.erb') diff --git a/templates/client.erb b/templates/client.erb index 5741701..bc42452 100644 --- a/templates/client.erb +++ b/templates/client.erb @@ -1,12 +1,12 @@ <% - # Downcase all information - dom = scope.lookupvar('::domain').downcase - h = scope.lookupvar('::hostname').downcase + # Downcase all information + dom = scope.lookupvar('::domain').downcase + h = scope.lookupvar('::hostname').downcase %> ### Munin client from Puppet template -# Domain: <%= @dom %> -# Registered on: <%= @h %> +# Domain: <%= dom %> +# Registered on: <%= h %> # Type: <%= @client_type %> <% if @description != 'absent' -%> # Description: <%= @description.gsub(/\n/, ' ') %> -- cgit v1.2.3