summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2010-04-07 10:58:12 -0400
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2010-04-07 10:58:12 -0400
commitc1e5fe085837af4c5569404619c77310d4285253 (patch)
tree52f44186776c76cb33cf60d6c7d92bc48033a3c7 /manifests
parentb87436f0513d1fea94b3fda625fd9e1c4f20c4d0 (diff)
add ability to register a non-puppet-managed munin node
Diffstat (limited to 'manifests')
-rw-r--r--manifests/register.pp25
1 files changed, 19 insertions, 6 deletions
diff --git a/manifests/register.pp b/manifests/register.pp
index e1271e1..59500a0 100644
--- a/manifests/register.pp
+++ b/manifests/register.pp
@@ -1,10 +1,23 @@
-define munin::register()
+define munin::register(
+ $host = 'absent',
+ $port = 'absent'
+)
{
- $munin_port_real = $munin_port ? { '' => 4949, default => $munin_port }
- $munin_host_real = $munin_host ? {
- '' => $fqdn,
- 'fqdn' => $fqdn,
- default => $munin_host
+ $munin_port_real = $port ? {
+ 'absent' => $munin_port ? {
+ '' => 4949,
+ default => $munin_port
+ },
+ default => $port
+ }
+
+ $munin_host_real = $host ? {
+ 'absent' => $munin_host ? {
+ '' => $fqdn,
+ 'fqdn' => $fqdn,
+ default => $munin_host
+ },
+ default => $host
}
@@file { "/var/lib/puppet/modules/munin/nodes/${name}_${munin_port_real}":