X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fbase_installation%2Fmanifests%2Fcronie.pp;h=3558d9f06334e51bc5f235249c284199c45e7fae;hb=2859008efe8f0a75344c7ba1c9c6e4d589f92da3;hp=72f2d8f709b97b98566b8e54cd1123638fd336a8;hpb=89c7d1dea4af6026af00624af77bb1a08c8ebd53;p=perso%2FImmae%2FProjets%2FPuppet.git diff --git a/modules/base_installation/manifests/cronie.pp b/modules/base_installation/manifests/cronie.pp index 72f2d8f..3558d9f 100644 --- a/modules/base_installation/manifests/cronie.pp +++ b/modules/base_installation/manifests/cronie.pp @@ -10,24 +10,39 @@ class base_installation::cronie inherits base_installation { owner => root, group => root, } - cron { 'puppet-pull-apply': - ensure => present, - command => "cd $base_installation::puppet_code_path ; /usr/bin/git pull", - user => root, - minute => '*/30', - require => File['post-hook'], + cron::job { 'puppet-pull-apply': + ensure => present, + command => "cd $base_installation::puppet_code_path ; /usr/bin/git pull", + user => root, + minute => '15,45', + require => File['post-hook'], + description => "Pull git and apply puppet changes", } - cron { 'puppet-apply': - ensure => present, - command => "cd $base_installation::puppet_code_path ; puppet apply $base_installation::puppet_code_path/manifests/site.pp", - user => root, - minute => '*/20' + cron::job::multiple { 'puppet-apply': + ensure => present, + jobs => [ + { + command => "cd $base_installation::puppet_code_path ; /usr/local/sbin/puppet_apply $base_installation::puppet_code_path/manifests/site.pp", + user => root, + minute => '*/20', + description => "Re-apply puppet changes regularly", + }, + { + command => "cd $base_installation::puppet_code_path ; /usr/local/sbin/puppet_apply $base_installation::puppet_code_path/manifests/site.pp", + user => root, + special => "reboot", + description => "Re-apply puppet changes at reboot", + } + ] } - cron { 'puppet-apply-reboot': - ensure => present, - command => "cd $base_installation::puppet_code_path ; puppet apply $base_installation::puppet_code_path/manifests/site.pp", - user => root, - special => "reboot" + + cron::daily { 'pacman_keys': + ensure => present, + command => "pacman-key --populate archlinux", + user => root, + minute => "0", + hour => "1", + description => "Populate pacman keys", } } }