From: Peter Palfrader Date: Sat, 28 Sep 2019 17:58:53 +0000 (+0200) Subject: rename dsa-check-backuppg-manual.conf X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=5fffbe18f4c7134aa14db4ae2afc03f6efce81d9;p=mirror%2Fdsa-puppet.git rename dsa-check-backuppg-manual.conf --- diff --git a/modules/postgres/manifests/backup_server.pp b/modules/postgres/manifests/backup_server.pp index 1f95f3eb8..1607db502 100644 --- a/modules/postgres/manifests/backup_server.pp +++ b/modules/postgres/manifests/backup_server.pp @@ -82,14 +82,14 @@ class postgres::backup_server { purge => true, force => true, recurse => true, - notify => Exec['update dsa-check-backuppg-manual.conf'], + notify => Exec['update dsa-check-backuppg.conf'], } - file { '/etc/dsa/postgresql-backup/dsa-check-backuppg.conf.d/manual.conf': - content => template('postgres/backup_server/dsa-check-backuppg-manual.conf.erb'), - notify => Exec['update dsa-check-backuppg-manual.conf'] + file { '/etc/dsa/postgresql-backup/dsa-check-backuppg.conf.d/globals.conf': + content => template('postgres/backup_server/dsa-check-backuppg-globals.conf.erb'), + notify => Exec['update dsa-check-backuppg.conf'] } File<<| tag == $postgres::backup_server::globals::tag_dsa_check_backupp |>> - exec { 'update dsa-check-backuppg-manual.conf': + exec { 'update dsa-check-backuppg.conf': command => @(EOF), perl -MYAML=LoadFile,Dump -MHash::Merge::Simple=merge -E 'say Dump(merge(map{LoadFile($_)}@ARGV))' /etc/dsa/postgresql-backup/dsa-check-backuppg.conf.d/*.conf > /etc/nagios/dsa-check-backuppg.conf | EOF diff --git a/modules/postgres/manifests/backup_server/register_backup_cluster.pp b/modules/postgres/manifests/backup_server/register_backup_cluster.pp index 5fdabab33..bc16a7646 100644 --- a/modules/postgres/manifests/backup_server/register_backup_cluster.pp +++ b/modules/postgres/manifests/backup_server/register_backup_cluster.pp @@ -45,6 +45,6 @@ define postgres::backup_server::register_backup_cluster ( ${pg_cluster}: | EOF tag => $postgres::backup_server::globals::tag_dsa_check_backupp, - notify => Exec['update dsa-check-backuppg-manual.conf'] + notify => Exec['update dsa-check-backuppg.conf'] } } diff --git a/modules/postgres/templates/backup_server/dsa-check-backuppg-globals.conf.erb b/modules/postgres/templates/backup_server/dsa-check-backuppg-globals.conf.erb new file mode 100644 index 000000000..7e2f30f8a --- /dev/null +++ b/modules/postgres/templates/backup_server/dsa-check-backuppg-globals.conf.erb @@ -0,0 +1,6 @@ +--- +rootdir: /srv/backups/pg +warn-age: + wal: 43200 + base: 950400 +retention: 1814400 diff --git a/modules/postgres/templates/backup_server/dsa-check-backuppg-manual.conf.erb b/modules/postgres/templates/backup_server/dsa-check-backuppg-manual.conf.erb deleted file mode 100644 index 7e2f30f8a..000000000 --- a/modules/postgres/templates/backup_server/dsa-check-backuppg-manual.conf.erb +++ /dev/null @@ -1,6 +0,0 @@ ---- -rootdir: /srv/backups/pg -warn-age: - wal: 43200 - base: 950400 -retention: 1814400