diff options
-rw-r--r-- | manifests/duplicity.pp | 5 | ||||
-rw-r--r-- | manifests/rdiff.pp | 6 | ||||
-rw-r--r-- | manifests/rsync.pp | 6 | ||||
-rw-r--r-- | manifests/server.pp | 6 |
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, |