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")
notarule => true,
}
- @@munin::master_per_node { $::fqdn:
- ipaddress => $::ipaddress,
- munin_async => $::munin_async,
- }
+ @@munin::master_per_node { $::fqdn: }
package { 'munin-async':
ensure => installed
-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'),
+ }
}
##
[<%= @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