aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-05-12 15:09:41 -0400
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-05-12 15:09:41 -0400
commit7d044de8029dd5f5d1f3778b1a71b3e31ebaede5 (patch)
treea7ec86626e5cd1a159b8ae00ecf009d36a23d3fa /manifests
parentbaead38b8081f7abc9c2610c6ad5e0909cc7723a (diff)
downloadpuppet-backupninja-master.tar.gz
puppet-backupninja-master.tar.bz2
Move nagios::service::passive to handler classes so that local backups may also be monitoredHEADmaster
Diffstat (limited to 'manifests')
-rw-r--r--manifests/duplicity.pp5
-rw-r--r--manifests/rdiff.pp6
-rw-r--r--manifests/rsync.pp6
-rw-r--r--manifests/server.pp6
4 files changed, 15 insertions, 8 deletions
diff --git a/manifests/duplicity.pp b/manifests/duplicity.pp
index 0ad8c2c..a05da87 100644
--- a/manifests/duplicity.pp
+++ b/manifests/duplicity.pp
@@ -138,5 +138,10 @@ define backupninja::duplicity( $order = 90,
mode => 0600,
require => File["${backupninja::configdir}"]
}
+
+ if $backupninja::manage_nagios {
+ nagios::service::passive { $nagios_description: }
+ }
+
}
diff --git a/manifests/rdiff.pp b/manifests/rdiff.pp
index a20077f..cd73d22 100644
--- a/manifests/rdiff.pp
+++ b/manifests/rdiff.pp
@@ -80,7 +80,6 @@ define backupninja::rdiff( $order = 90,
backuptag => $backuptag,
backupkeys => $backupkeystore,
keytype => $backupkeytype,
- nagios_description => $nagios_description
}
backupninja::key { "${user}-${name}":
@@ -101,5 +100,10 @@ define backupninja::rdiff( $order = 90,
mode => 0600,
require => File["${backupninja::configdir}"]
}
+
+ if $backupninja::manage_nagios {
+ nagios::service::passive { $nagios_description: }
+ }
+
}
diff --git a/manifests/rsync.pp b/manifests/rsync.pp
index 145fdad..fc59950 100644
--- a/manifests/rsync.pp
+++ b/manifests/rsync.pp
@@ -101,7 +101,6 @@ define backupninja::rsync( $order = 90,
backuptag => $backuptag,
keytype => $backupkeytype,
backupkeys => $backupkeystore,
- nagios_description => $nagios_description
}
backupninja::key { "${user}-${name}":
@@ -121,4 +120,9 @@ define backupninja::rsync( $order = 90,
mode => 0600,
require => File["${backupninja::configdir}"]
}
+
+ if $backupninja::manage_nagios {
+ nagios::service::passive { $nagios_description: }
+ }
+
}
diff --git a/manifests/server.pp b/manifests/server.pp
index f7be21e..49e42a0 100644
--- a/manifests/server.pp
+++ b/manifests/server.pp
@@ -68,14 +68,8 @@ class backupninja::server (
$uid = false,
$gid = "backupninjas",
$backuptag = "backupninja-${::fqdn}",
- $nagios_description = 'backups'
) {
- if $backupninja::manage_nagios {
- # configure a passive service check for backups
- nagios::service::passive { $nagios_description: }
- }
-
if !defined(Backupninja_server_realize["${::fqdn}@${host}"]) {
@@backupninja_server_realize { "${::fqdn}@${host}":
host => $::fqdn,