diff options
Diffstat (limited to 'modules/munin')
-rw-r--r-- | modules/munin/files/master.conf | 1 | ||||
-rw-r--r-- | modules/munin/files/munin.conf | 1 | ||||
-rw-r--r-- | modules/munin/manifests/conf.pp | 5 | ||||
-rw-r--r-- | modules/munin/manifests/init.pp | 18 | ||||
-rw-r--r-- | modules/munin/manifests/node.pp | 12 | ||||
-rw-r--r-- | modules/munin/manifests/plugin.pp | 7 | ||||
-rw-r--r-- | modules/munin/templates/node.conf | 3 |
7 files changed, 47 insertions, 0 deletions
diff --git a/modules/munin/files/master.conf b/modules/munin/files/master.conf new file mode 100644 index 0000000..2f42957 --- /dev/null +++ b/modules/munin/files/master.conf @@ -0,0 +1 @@ +htmldir /srv/http/munin diff --git a/modules/munin/files/munin.conf b/modules/munin/files/munin.conf new file mode 100644 index 0000000..16d4983 --- /dev/null +++ b/modules/munin/files/munin.conf @@ -0,0 +1 @@ +includedir /etc/munin/munin-conf.d diff --git a/modules/munin/manifests/conf.pp b/modules/munin/manifests/conf.pp new file mode 100644 index 0000000..182d065 --- /dev/null +++ b/modules/munin/manifests/conf.pp @@ -0,0 +1,5 @@ +class munin::conf { + file { '/etc/munin/munin.conf': + source => 'puppet:///modules/munin/munin.conf'; + } +} diff --git a/modules/munin/manifests/init.pp b/modules/munin/manifests/init.pp new file mode 100644 index 0000000..26672d3 --- /dev/null +++ b/modules/munin/manifests/init.pp @@ -0,0 +1,18 @@ +class munin { + include munin::conf + + package { 'munin': + before => Class['munin::conf']; + } + + file { + '/srv/http/munin': + ensure => directory, + owner => 'munin', + group => 'munin', + require => Package['munin']; + '/etc/munin/munin-conf.d/master': + source => 'puppet:///modules/munin/master.conf', + require => Package['munin']; + } +} diff --git a/modules/munin/manifests/node.pp b/modules/munin/manifests/node.pp new file mode 100644 index 0000000..eca2080 --- /dev/null +++ b/modules/munin/manifests/node.pp @@ -0,0 +1,12 @@ +class munin::node { + include munin::conf + + package { 'munin-node': + before => Class['munin::conf']; + } + + file { '/etc/munin/munin-conf.d/node': + content => template('munin/node.conf'), + require => Package['munin-node']; + } +} diff --git a/modules/munin/manifests/plugin.pp b/modules/munin/manifests/plugin.pp new file mode 100644 index 0000000..09c2677 --- /dev/null +++ b/modules/munin/manifests/plugin.pp @@ -0,0 +1,7 @@ +define munin::plugin($source=$name) { + file { "/etc/munin/plugins/$name": + ensure => link, + target => "/usr/lib/munin/plugins/$source", + require => Package['munin-node']; + } +} diff --git a/modules/munin/templates/node.conf b/modules/munin/templates/node.conf new file mode 100644 index 0000000..12297d0 --- /dev/null +++ b/modules/munin/templates/node.conf @@ -0,0 +1,3 @@ +[<%= @hostname %>] + address 127.0.0.1 + use_node_name yes |