projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2f9b639
)
More munin stuff, supporting munin-async if it is on the client
author
Peter Palfrader
<peter@palfrader.org>
Mon, 27 Aug 2012 12:14:22 +0000
(12:14 +0000)
committer
Peter Palfrader
<peter@palfrader.org>
Mon, 27 Aug 2012 12:14:22 +0000
(12:14 +0000)
modules/debian-org/lib/facter/software.rb
patch
|
blob
|
history
modules/munin/files/munin-async-authkeys
[new file with mode: 0644]
patch
|
blob
modules/munin/manifests/init.pp
patch
|
blob
|
history
modules/munin/manifests/master-per-node.pp
patch
|
blob
|
history
modules/munin/manifests/master.pp
patch
|
blob
|
history
modules/munin/templates/munin.conf-per-node.erb
patch
|
blob
|
history
modules/munin/templates/munin.conf.erb
patch
|
blob
|
history
diff --git
a/modules/debian-org/lib/facter/software.rb
b/modules/debian-org/lib/facter/software.rb
index
de30d49
..
533c779
100644
(file)
--- a/
modules/debian-org/lib/facter/software.rb
+++ b/
modules/debian-org/lib/facter/software.rb
@@
-142,7
+142,7
@@
Facter.add("unbound") do
end
end
end
end
end
end
-Facter.add("munin
-
async") do
+Facter.add("munin
_
async") do
setcode do
FileTest.exist?("/usr/share/munin/munin-async")
end
setcode do
FileTest.exist?("/usr/share/munin/munin-async")
end
diff --git a/modules/munin/files/munin-async-authkeys
b/modules/munin/files/munin-async-authkeys
new file mode 100644
(file)
index 0000000..
bf33aec
--- /dev/null
+++ b/
modules/munin/files/munin-async-authkeys
@@ -0,0
+1
@@
+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)
diff --git
a/modules/munin/manifests/init.pp
b/modules/munin/manifests/init.pp
index
d5df24e
..
8258f9b
100644
(file)
--- a/
modules/munin/manifests/init.pp
+++ b/
modules/munin/manifests/init.pp
@@
-60,5
+60,20
@@
class munin {
notarule => true,
}
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',
+ }
+ }
}
}
diff --git
a/modules/munin/manifests/master-per-node.pp
b/modules/munin/manifests/master-per-node.pp
index
5f8dee9
..
1d8864e
100644
(file)
--- a/
modules/munin/manifests/master-per-node.pp
+++ b/
modules/munin/manifests/master-per-node.pp
@@
-1,4
+1,8
@@
-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'),
}
file { "/etc/munin/munin-conf.d/${name}.conf":
content => template('munin/munin.conf-per-node.erb'),
}
diff --git
a/modules/munin/manifests/master.pp
b/modules/munin/manifests/master.pp
index
6f606e3
..
e53aba3
100644
(file)
--- a/
modules/munin/manifests/master.pp
+++ b/
modules/munin/manifests/master.pp
@@
-11,9
+11,12
@@
class munin::master {
if $::hostname == 'menotti' {
file { '/etc/munin/munin-conf.d':
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<<| |>>
}
Munin::Master-per-node<<| |>>
diff --git
a/modules/munin/templates/munin.conf-per-node.erb
b/modules/munin/templates/munin.conf-per-node.erb
index
e163d29
..
c7f39b6
100644
(file)
--- a/
modules/munin/templates/munin.conf-per-node.erb
+++ b/
modules/munin/templates/munin.conf-per-node.erb
@@
-2,5
+2,9
@@
### THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
##
### 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 %>
diff --git
a/modules/munin/templates/munin.conf.erb
b/modules/munin/templates/munin.conf.erb
index
b223bd6
..
519e033
100644
(file)
--- a/
modules/munin/templates/munin.conf.erb
+++ b/
modules/munin/templates/munin.conf.erb
@@
-3,6
+3,10
@@
### USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
##
### 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
dbdir /var/lib/munin
htmldir /var/cache/munin/www
logdir /var/log/munin
@@
-21,3
+25,4
@@
graph_strategy cgi
end
out
%>
end
out
%>
+<% end -%>