rename dsa-check-backuppg-manual.conf
authorPeter Palfrader <peter@palfrader.org>
Sat, 28 Sep 2019 17:58:53 +0000 (19:58 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 28 Sep 2019 17:58:53 +0000 (19:58 +0200)
modules/postgres/manifests/backup_server.pp
modules/postgres/manifests/backup_server/register_backup_cluster.pp
modules/postgres/templates/backup_server/dsa-check-backuppg-globals.conf.erb [new file with mode: 0644]
modules/postgres/templates/backup_server/dsa-check-backuppg-manual.conf.erb [deleted file]

index 1f95f3e..1607db5 100644 (file)
@@ -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
index 5fdabab..bc16a76 100644 (file)
@@ -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 (file)
index 0000000..7e2f30f
--- /dev/null
@@ -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 (file)
index 7e2f30f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
---- 
-rootdir: /srv/backups/pg
-warn-age:
-  wal: 43200
-  base: 950400
-retention: 1814400