From f39815c7f91442ee646226e3a0114edc17373593 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 25 Dec 2017 13:17:35 +0100 Subject: [PATCH] Move crontab pg base backup into dsa-puppet-stuff --- modules/postgres/manifests/backup_server.pp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/postgres/manifests/backup_server.pp b/modules/postgres/manifests/backup_server.pp index 653b5f88d..e95c4aea3 100644 --- a/modules/postgres/manifests/backup_server.pp +++ b/modules/postgres/manifests/backup_server.pp @@ -36,13 +36,22 @@ class postgres::backup_server { | EOTEMPLATE order => '99', } + file { '/etc/cron.d/puppet-postgres-make-base-backups': + ensure => absent; + } if $::hostname in [backuphost] { - file { '/etc/cron.d/puppet-postgres-make-base-backups': - content => "20 1 * * 0 debbackup chronic ${$postgres::backup_server::globals::make_base_backups}\n", + concat::fragment { 'dsa-puppet-stuff--porterbox-chroot-update': + target => '/etc/cron.d/dsa-puppet-stuff', + content => @("EOF") + 20 1 * * 0 debbackup chronic ${$postgres::backup_server::globals::make_base_backups} + | EOF } } else { - file { '/etc/cron.d/puppet-postgres-make-base-backups': - content => "20 0 * * 6 debbackup chronic ${$postgres::backup_server::globals::make_base_backups}\n", + concat::fragment { 'dsa-puppet-stuff--porterbox-chroot-update': + target => '/etc/cron.d/dsa-puppet-stuff', + content => @("EOF") + 20 0 * * 6 debbackup chronic ${$postgres::backup_server::globals::make_base_backups} + | EOF } } -- 2.20.1