end
end
end
-Facter.add("munin-async") do
+Facter.add("munin_async") do
setcode do
FileTest.exist?("/usr/share/munin/munin-async")
end
--- /dev/null
+command="/usr/share/munin/munin-async --spoolfetch",from="206.12.19.143",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,no-user-rc ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCiaY2clXjSIwjwBKolGN+JYuCev6kXzxPbX7pG8zVmdOjfEVpS2gPbWDliIyrpSxXbOPjswHcBEh67NWLAb4lLaAQ/neWrCzzri6hyPQMsl27kqFUzqHbqJml5tTDJlT/wBrNThuWIAWblS9Ck44fPnoRcJEyosGF1dOZVwYvcTGGLQMRq3U09HgatFJvNVX4x2IVBo5jDOCOZSGx5Ur+vAIJSxcQFY4DuT5Ee3ggx7g1PU36ciL0I0Ep3T8epr0yJwrXjtnpvJHOr3q4zDt5L5+XFZeozeYzG6w3NNVYA52knVNNsIzwKiy+hyHwiLf+Si0h4iTQ60jUr2pcOAeVn munin@menotti (2012-08-07)
notarule => true,
}
- @@munin::master-per-node { $::fqdn: }
+ @@munin::master-per-node {
+ $::fqdn:
+ ipaddress => $::ipaddress,
+ munin_async => $::munin_async,
+ ;
+ }
+
+ if $munin_async and $munin_async == 'true' {
+ file { '/etc/ssh/userkeys/munin-async':
+ source => 'puppet:///modules/munin/munin-async-authkeys',
+ }
+ } else {
+ file { '/etc/ssh/userkeys/munin-async':
+ ensure => 'absent',
+ }
+ }
}
-define munin::master-per-node() {
+define munin::master-per-node($ipaddress, $munin_async) {
+ $client_fqdn = $name
+ $client_ipaddress = $ipaddress
+ $client_munin_async = $munin_async
+
file { "/etc/munin/munin-conf.d/${name}.conf":
content => template('munin/munin.conf-per-node.erb'),
}
if $::hostname == 'menotti' {
file { '/etc/munin/munin-conf.d':
- ensure => directory,
- mode => 755,
- ;
+ ensure => directory,
+ mode => '0755',
+ purge => true,
+ force => true,
+ recurse => true,
+ source => 'puppet:///files/empty/',
}
Munin::Master-per-node<<| |>>
### THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
##
-[<%= fqdn %>]
- address <%= ipaddress %>
+[<%= client_fqdn %>]
+<%- if has_variable?('client_munin_async') and client_munin_async and client_munin_async == "true" %>
+ address ssh://munin-async@<%= client_fqdn %>/set-in-authkeys
+<%- else %>
+ address <%= client_ipaddress %>
+<%- end %>
### USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
##
+includedir /etc/munin/munin-conf.d
+
+<% if hostname != "menotti" -%>
+
dbdir /var/lib/munin
htmldir /var/cache/munin/www
logdir /var/log/munin
end
out
%>
+<% end -%>