diff options
author | David Schmitt <david@schmitt.edv-bus.at> | 2009-05-31 21:18:22 +0200 |
---|---|---|
committer | David Schmitt <david@schmitt.edv-bus.at> | 2009-05-31 21:18:22 +0200 |
commit | c223993eba487cc24425890b2b9b6abd2f6c4d35 (patch) | |
tree | a60b619da239b295bb52a65c47f65d30059d2fcc | |
parent | c9c389010b40f1768f039200539cf27a032d0348 (diff) |
adapt to new "common" module
-rw-r--r-- | README | 6 | ||||
-rw-r--r-- | manifests/host.pp | 4 | ||||
-rw-r--r-- | manifests/init.pp | 4 | ||||
-rw-r--r-- | manifests/plugin.pp | 4 |
4 files changed, 9 insertions, 9 deletions
@@ -37,9 +37,9 @@ To use this module, follow these directions: c. you will also need to create the following empty directories: mkdir /etc/puppet/modules/munin/files/empty - mkdir /etc/puppet/modules/munin/files/modules_dir - mkdir -p /etc/puppet/modules/munin/files/nodes/modules_dir - mkdir -p /etc/puppet/modules/munin/files/plugins/modules_dir + mkdir /etc/puppet/modules/munin/files/module_dir + mkdir -p /etc/puppet/modules/munin/files/nodes/module_dir + mkdir -p /etc/puppet/modules/munin/files/plugins/module_dir d. Add to the top of your site.pp a variable which indicates what IP should be allowed to connect to your individual munin-nodes (this is typically your main munin host's IP): diff --git a/manifests/host.pp b/manifests/host.pp index af0f11b..f89cbb8 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -25,13 +25,13 @@ class munin::snmp_collector { file { - "/var/lib/puppet/modules/munin/create_snmp_links": + "${module_dir_path}/munin/create_snmp_links": source => "puppet://$servername/munin/create_snmp_links.sh", mode => 755, owner => root, group => root; } exec { "create_snmp_links": - command => "/var/lib/puppet/modules/munin/create_snmp_links $NODESDIR", + command => "${module_dir_path}/munin/create_snmp_links $NODESDIR", require => File["snmp_links"], timeout => "2048", schedule => daily diff --git a/manifests/init.pp b/manifests/init.pp index a1ea92c..4a049a4 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -5,9 +5,9 @@ # the port is a parameter so vservers can share IP addresses and still be happy # Define where the individual nodes' configs are stored -$NODESDIR="/var/lib/puppet/modules/munin/nodes" +$NODESDIR="${module_dir_path}/munin/nodes" -modules_dir { [ "munin", "munin/nodes", "munin/plugins" ]: } +module_dir { [ "munin", "munin/nodes", "munin/plugins" ]: } import "host.pp" import "client.pp" diff --git a/manifests/plugin.pp b/manifests/plugin.pp index a23a567..85fa444 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -53,14 +53,14 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { "absent": { munin::plugin{ $name: ensure => absent } } default: { file { - "/var/lib/puppet/modules/munin/plugins/${name}": + "${module_dir_path}/munin/plugins/${name}": source => $source, mode => 0755, owner => root, group => root; } munin::plugin { $name: ensure => $ensure, config => $config, - script_path => "/var/lib/puppet/modules/munin/plugins", + script_path => "${module_dir_path}/munin/plugins", } } } |