Add a second easydns ipv4 address
[mirror/dsa-puppet.git] / modules / postgres / manifests / backup_server.pp
index 653b5f8..a5361b1 100644 (file)
@@ -36,14 +36,17 @@ class postgres::backup_server {
                                | EOTEMPLATE
                order  => '99',
        }
-       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",
-               }
-       } else  {
-               file { '/etc/cron.d/puppet-postgres-make-base-backups':
-                       content  => "20 0 * * 6 debbackup chronic ${$postgres::backup_server::globals::make_base_backups}\n",
-               }
+       file { '/etc/cron.d/puppet-postgres-make-base-backups': ensure => absent; }
+       file { '/var/lib/dsa/postgres-make-base-backups':
+               ensure => directory,
+               owner => 'debbackup',
+               mode => '0755',
+       }
+       concat::fragment { 'dsa-puppet-stuff--postgres-make_base_backups':
+               target => '/etc/cron.d/dsa-puppet-stuff',
+               content  => @("EOF")
+                       */30 * * * * debbackup sleep $(( RANDOM \% 1200 )); chronic ${$postgres::backup_server::globals::make_base_backups}
+                       | EOF
        }
 
        ####
@@ -59,6 +62,10 @@ class postgres::backup_server {
                mode   => '0555',
                notify  => Exec['postgres-make-backup-sshauthkeys'],
        }
+       file { '/usr/local/bin/postgres-make-one-base-backup':
+               source  => 'puppet:///modules/postgres/backup_server/postgres-make-one-base-backup',
+               mode   => '0555'
+       }
        file { '/etc/dsa/postgresql-backup/sshkeys-manual':
                content => template('postgres/backup_server/sshkeys-manual.erb'),
                notify  => Exec['postgres-make-backup-sshauthkeys'],
@@ -95,16 +102,7 @@ class postgres::backup_server {
                notify => Exec['update dsa-check-backuppg-manual.conf']
        }
        file { '/etc/dsa/postgresql-backup/dsa-check-backuppg.conf.d/moszumanska.conf':
-               ensure => ($::hostname in [backuphost]) ? {
-                               true    => 'absent',
-                               default => 'present'
-                       },
-               content  => @(EOF),
-                               --- 
-                               backups:
-                                 moszumanska:
-                                   main:
-                               | EOF
+               ensure => 'absent',
                notify => Exec['update dsa-check-backuppg-manual.conf']
        }
        File<<| tag == $postgres::backup_server::globals::tag_dsa_check_backupp |>>