From c5a071b7d9411d67218254a7d12a92e7c3507c55 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 18 Feb 2010 14:47:44 -0200 Subject: Changing munin configuration --- manifests/init.pp | 21 +++++++++++++-------- manifests/munin.pp | 4 ++-- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 34680fa..6e7b7fb 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -26,12 +26,6 @@ class nodo { include utils include cron - # We include munin configuration if it's not defined by - # and exported resource. - if !defined(Munin_node[$hostname]) { - include munin::client - } - # Set timezone and ntp config # # We config those here but leave class inclusion elsewhere @@ -167,6 +161,11 @@ class nodo::server inherits nodo { mode => 0644, ensure => present, } + + # Munin configuration + munin_node { "$hostname": + id => '00', + } } class nodo::vserver inherits nodo { @@ -182,8 +181,14 @@ class nodo::vserver inherits nodo { dohwinfo => false, } - # Apply munin configuration for this node - Munin_node <<| tag == $hostname |>> + # We include munin configuration if it's not defined by + # and exported resource. + if !defined(Munin_node[$hostname]) { + include munin::client + } else { + # Apply munin configuration for this node + Munin_node <<| tag == $hostname |>> + } # Define a vserver instance define instance($context, $ensure = 'running', $proxy = false, $puppetmaster = false, $gitd = false, diff --git a/manifests/munin.pp b/manifests/munin.pp index 7c77dac..1795226 100644 --- a/manifests/munin.pp +++ b/manifests/munin.pp @@ -1,6 +1,6 @@ # Define a munin node with custom port -define munin_node($type, $id) { +define munin_node($id) { # Use one port for each node - $munin_port = "59$id" + $munin_port = "49$id" include munin::client } -- cgit v1.2.3