From 3a63826fbd692815168b7d2e67d0ff978069fbb3 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 22 Sep 2019 15:01:28 +0200 Subject: [PATCH] All our munin is munin-async these days --- modules/debian_org/lib/facter/software.rb | 5 ----- modules/munin/manifests/init.pp | 5 +---- modules/munin/manifests/master_per_node.pp | 12 +++++------- modules/munin/templates/munin.conf_per_node.erb | 11 +---------- 4 files changed, 7 insertions(+), 26 deletions(-) diff --git a/modules/debian_org/lib/facter/software.rb b/modules/debian_org/lib/facter/software.rb index 4863e05d8..c877a22a9 100644 --- a/modules/debian_org/lib/facter/software.rb +++ b/modules/debian_org/lib/facter/software.rb @@ -118,11 +118,6 @@ Facter.add("unbound") do end end end -Facter.add("munin_async") do - setcode do - FileTest.exist?("/usr/share/munin/munin-async") - end -end Facter.add("samhain") do setcode do if FileTest.exist?("/usr/sbin/samhain") diff --git a/modules/munin/manifests/init.pp b/modules/munin/manifests/init.pp index 91657e08a..4f541bfcd 100644 --- a/modules/munin/manifests/init.pp +++ b/modules/munin/manifests/init.pp @@ -68,10 +68,7 @@ class munin { notarule => true, } - @@munin::master_per_node { $::fqdn: - ipaddress => $::ipaddress, - munin_async => $::munin_async, - } + @@munin::master_per_node { $::fqdn: } package { 'munin-async': ensure => installed diff --git a/modules/munin/manifests/master_per_node.pp b/modules/munin/manifests/master_per_node.pp index cdb1dec0c..1d397ee5d 100644 --- a/modules/munin/manifests/master_per_node.pp +++ b/modules/munin/manifests/master_per_node.pp @@ -1,9 +1,7 @@ -define munin::master_per_node($ipaddress, $munin_async) { - $client_fqdn = $name - $client_ipaddress = $ipaddress - $client_munin_async = $munin_async +define munin::master_per_node() { + $client_fqdn = $name - file { "/etc/munin/munin-conf.d/${name}.conf": - content => template('munin/munin.conf_per_node.erb'), - } + file { "/etc/munin/munin-conf.d/${name}.conf": + content => template('munin/munin.conf_per_node.erb'), + } } diff --git a/modules/munin/templates/munin.conf_per_node.erb b/modules/munin/templates/munin.conf_per_node.erb index 64224bdaf..b1cf1d7a9 100644 --- a/modules/munin/templates/munin.conf_per_node.erb +++ b/modules/munin/templates/munin.conf_per_node.erb @@ -3,13 +3,4 @@ ## [<%= @client_fqdn %>] -<% -# 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 %> -<%- end %> +address ssh://munin-async@<%= @client_fqdn %>/set-in-authkeys -- 2.20.1