aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-02-18 14:47:44 -0200
committerSilvio Rhatto <rhatto@riseup.net>2010-02-18 14:47:44 -0200
commitc5a071b7d9411d67218254a7d12a92e7c3507c55 (patch)
tree5f2ac75a96ab08f922a8d393829238dab6d3b495 /manifests
parentcce2471f2139a336319874b2e305c5939565baf1 (diff)
downloadpuppet-nodo-c5a071b7d9411d67218254a7d12a92e7c3507c55.tar.gz
puppet-nodo-c5a071b7d9411d67218254a7d12a92e7c3507c55.tar.bz2
Changing munin configuration
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp21
-rw-r--r--manifests/munin.pp4
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
}