Move crontab pg base backup into dsa-puppet-stuff
authorPeter Palfrader <peter@palfrader.org>
Mon, 25 Dec 2017 12:17:35 +0000 (13:17 +0100)
committerPeter Palfrader <peter@palfrader.org>
Mon, 25 Dec 2017 12:17:35 +0000 (13:17 +0100)
modules/postgres/manifests/backup_server.pp

index 653b5f8..e95c4ae 100644 (file)
@@ -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
                }
        }