aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-06-04 11:41:01 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-06-04 11:41:01 -0300
commita3ad3d98598e4da55e569340120f46869b917540 (patch)
treea09ecebdf6de154bb3f4546a2e379524e6ba33ad
parent4aee481e4f0bceaeadbceb3a0f1553091fea37df (diff)
downloadpuppet-nodo-a3ad3d98598e4da55e569340120f46869b917540.tar.gz
puppet-nodo-a3ad3d98598e4da55e569340120f46869b917540.tar.bz2
Cleaning up nodo::subsystem::monitor
-rw-r--r--manifests/base/host.pp4
-rw-r--r--manifests/base/vserver.pp4
-rw-r--r--manifests/subsystem/monitor.pp12
3 files changed, 4 insertions, 16 deletions
diff --git a/manifests/base/host.pp b/manifests/base/host.pp
index a2753c5..f9af2e1 100644
--- a/manifests/base/host.pp
+++ b/manifests/base/host.pp
@@ -38,9 +38,7 @@ class nodo::base::host {
# Monitoring
if !defined(Class['nodo::subsystem::monitor']) {
- class { 'nodo::subsystem::monitor':
- type => 'host',
- }
+ class { 'nodo::subsystem::monitor': }
}
# Munin configuration
diff --git a/manifests/base/vserver.pp b/manifests/base/vserver.pp
index 68392ec..c8fbd71 100644
--- a/manifests/base/vserver.pp
+++ b/manifests/base/vserver.pp
@@ -28,9 +28,7 @@ class nodo::base::vserver {
}
# Nagios configuration
- class { 'nodo::subsystem::monitor':
- type => 'vserver',
- }
+ class { 'nodo::subsystem::monitor': }
}
}
diff --git a/manifests/subsystem/monitor.pp b/manifests/subsystem/monitor.pp
index a444479..2c0d019 100644
--- a/manifests/subsystem/monitor.pp
+++ b/manifests/subsystem/monitor.pp
@@ -1,5 +1,4 @@
class nodo::subsystem::monitor(
- $type = 'vserver',
$use_nagios = hiera('nodo::subsystem::monitor::use_nagios', True),
$check_ping = hiera('nodo::subsystem::monitor::check_ping', present),
$check_ssh = hiera('nodo::subsystem::monitor::check_ssh', absent),
@@ -9,15 +8,8 @@ class nodo::subsystem::monitor(
) {
if $use_nagios != false {
-
- if $type == 'vserver' {
- include nagios::target::fqdn
- }
-
- if $type == 'host' {
- class{ 'nagios::target':
- address => $address,
- }
+ class{ 'nagios::target':
+ address => $address,
}
nagios::service::ping { "${::fqdn}":