]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/role/manifests/backup.pp
Change release url
[perso/Immae/Projets/Puppet.git] / modules / role / manifests / backup.pp
index d7ba4867381e9c6c72b77fea7d18d6490ac793f2..6b8d00c00d93b10af27ba96724931eadbecaa5ac 100644 (file)
@@ -13,6 +13,12 @@ class role::backup (
   include "profile::tools"
   include "profile::xmr_stak"
   include "profile::known_hosts"
+  include "profile::boinc"
+  include "profile::monitoring"
+
+  include "role::backup::postgresql"
+
+  ensure_packages(["rsync"])
 
   ssh_keygen { $user:
     notify => Notify_refresh["notify-backup-sshkey-change"]
@@ -39,12 +45,12 @@ class role::backup (
     mode           => "0755",
   }
 
-  cron { "backup":
+  cron::job { "backup":
     ensure  => present,
     command => $backup_script,
     user    => $user,
     minute  => 25,
-    hour    => 3,
+    hour    => "3,15",
     require => Concat[$backup_script],
   }
 
@@ -119,5 +125,11 @@ class role::backup (
         order   => "$order_dirname-$order_part",
       }
     }
+
+    @profile::monitoring::local_service { "Last backup in $base is not too old":
+      local => {
+        check_command => "check_last_file_date!$base!14",
+      }
+    }
   }
 }