]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/base_installation/manifests/cronie.pp
Disable mailto for all puppet apply
[perso/Immae/Projets/Puppet.git] / modules / base_installation / manifests / cronie.pp
index 3558d9f06334e51bc5f235249c284199c45e7fae..923e181d61d315e9c86e824225184848a38155a3 100644 (file)
@@ -1,6 +1,10 @@
 class base_installation::cronie inherits base_installation {
   ensure_packages(['cronie'])
 
+  Package["cronie"] -> Cron::Job <| |>
+  Package["cronie"] -> Cron::Job::Multiple <| |>
+  Package["cronie"] -> Cron::Daily <| |>
+
   unless empty($base_installation::puppet_code_path) {
     file { 'post-hook':
       ensure  => file,
@@ -12,6 +16,7 @@ class base_installation::cronie inherits base_installation {
     }
     cron::job { 'puppet-pull-apply':
       ensure      => present,
+      environment => [ 'MAILTO=""' ],
       command     => "cd $base_installation::puppet_code_path ; /usr/bin/git pull",
       user        => root,
       minute      => '15,45',
@@ -20,6 +25,7 @@ class base_installation::cronie inherits base_installation {
     }
     cron::job::multiple { 'puppet-apply':
       ensure => present,
+      environment => [ 'MAILTO=""' ],
       jobs   => [
         {
           command     => "cd $base_installation::puppet_code_path ; /usr/local/sbin/puppet_apply $base_installation::puppet_code_path/manifests/site.pp",