#
-class postgres::backup_server::globals {
- $make_base_backups = '/usr/local/bin/postgres-make-base-backups'
- $pgpassfile = '/home/debbackup/.pgpass'
- $sshkeys_sources = '/etc/dsa/postgresql-backup/sshkeys-sources'
-
- $tag_base_backup = "postgresql::server::backup-source-make-base-backup-entry"
- $tag_source_sshkey = "postgresql::server::backup-source-sshkey"
- $tag_source_pgpassline = "postgresql::server::backup-source-pgpassline"
- $tag_dsa_check_backupp = "postgresql::server::backup-dsa-check-backuppg"
-}
-
class postgres::backup_server {
include postgres::backup_server::globals
}
Concat::Fragment <<| tag == $postgres::backup_server::globals::tag_source_pgpassline |>>
}
-
-define postgres::backup_server::register_backup_clienthost (
- $sshpubkey = $::postgresql_key,
- $ipaddrlist = join(getfromhash($site::nodeinfo, 'ldap', 'ipHostNumber'), ","),
- $hostname = $::hostname,
-) {
- include postgres::backup_server::globals
-
- if $sshpubkey {
- $addr = assert_type(String[1], $ipaddrlist)
- @@concat::fragment { "postgresql::server::backup-source-clienthost::$name::$fqdn":
- target => $postgres::backup_server::globals::sshkeys_sources ,
- content => @("EOF"),
- ${hostname} ${addr} ${sshpubkey}
- | EOF
- tag => $postgres::backup_server::globals::tag_source_sshkey,
- }
- }
-}
-
-define postgres::backup_server::register_backup_cluster (
- $hostname = $::hostname,
- $fqdn = $::fqdn,
- $pg_port,
- $pg_role,
- $pg_password,
- $pg_cluster,
- $pg_version,
-) {
- include postgres::backup_server::globals
-
- # foobar.debian.org:5432:*:debian-backup:swordfish
- @@concat::fragment { "postgresql::server::backup-source-pgpassline::$hostname::$pg_port::$pg_role":
- target => $postgres::backup_server::globals::pgpassfile,
- content => @("EOF"),
- ${fqdn}:${pg_port}:*:${pg_role}:${pg_password}
- | EOF
- tag => $postgres::backup_server::globals::tag_source_pgpassline,
- }
- #
- # vittoria.debian.org 5432 debian-backup main 9.6
- @@concat::fragment { "postgresql::server::backup-source-make-base-backup-entry::$hostname::$pg_port::$pg_role":
- target => $postgres::backup_server::globals::make_base_backups,
- content => @("EOF"),
- ${fqdn} ${pg_port} ${pg_role} ${pg_cluster} ${pg_version}
- | EOF
- tag => $postgres::backup_server::globals::tag_base_backup,
- }
-
- @@file { "/etc/dsa/postgresql-backup/dsa-check-backuppg.conf.d/${hostname}-${pg_cluster}.conf":
- content => @("EOF"),
- ---
- backups:
- ${hostname}:
- ${pg_cluster}:
- | EOF
- tag => $postgres::backup_server::globals::tag_dsa_check_backupp,
- notify => Exec['update dsa-check-backuppg-manual.conf']
- }
-}
--- /dev/null
+#
+class postgres::backup_server::globals {
+ $make_base_backups = '/usr/local/bin/postgres-make-base-backups'
+ $pgpassfile = '/home/debbackup/.pgpass'
+ $sshkeys_sources = '/etc/dsa/postgresql-backup/sshkeys-sources'
+
+ $tag_base_backup = "postgresql::server::backup-source-make-base-backup-entry"
+ $tag_source_sshkey = "postgresql::server::backup-source-sshkey"
+ $tag_source_pgpassline = "postgresql::server::backup-source-pgpassline"
+ $tag_dsa_check_backupp = "postgresql::server::backup-dsa-check-backuppg"
+}
--- /dev/null
+#
+define postgres::backup_server::register_backup_clienthost (
+ $sshpubkey = $::postgresql_key,
+ $ipaddrlist = join(getfromhash($site::nodeinfo, 'ldap', 'ipHostNumber'), ","),
+ $hostname = $::hostname,
+) {
+ include postgres::backup_server::globals
+
+ if $sshpubkey {
+ $addr = assert_type(String[1], $ipaddrlist)
+ @@concat::fragment { "postgresql::server::backup-source-clienthost::$name::$fqdn":
+ target => $postgres::backup_server::globals::sshkeys_sources ,
+ content => @("EOF"),
+ ${hostname} ${addr} ${sshpubkey}
+ | EOF
+ tag => $postgres::backup_server::globals::tag_source_sshkey,
+ }
+ }
+}
--- /dev/null
+#
+define postgres::backup_server::register_backup_cluster (
+ $hostname = $::hostname,
+ $fqdn = $::fqdn,
+ $pg_port,
+ $pg_role,
+ $pg_password,
+ $pg_cluster,
+ $pg_version,
+) {
+ include postgres::backup_server::globals
+
+ # foobar.debian.org:5432:*:debian-backup:swordfish
+ @@concat::fragment { "postgresql::server::backup-source-pgpassline::$hostname::$pg_port::$pg_role":
+ target => $postgres::backup_server::globals::pgpassfile,
+ content => @("EOF"),
+ ${fqdn}:${pg_port}:*:${pg_role}:${pg_password}
+ | EOF
+ tag => $postgres::backup_server::globals::tag_source_pgpassline,
+ }
+ #
+ # vittoria.debian.org 5432 debian-backup main 9.6
+ @@concat::fragment { "postgresql::server::backup-source-make-base-backup-entry::$hostname::$pg_port::$pg_role":
+ target => $postgres::backup_server::globals::make_base_backups,
+ content => @("EOF"),
+ ${fqdn} ${pg_port} ${pg_role} ${pg_cluster} ${pg_version}
+ | EOF
+ tag => $postgres::backup_server::globals::tag_base_backup,
+ }
+
+ @@file { "/etc/dsa/postgresql-backup/dsa-check-backuppg.conf.d/${hostname}-${pg_cluster}.conf":
+ content => @("EOF"),
+ ---
+ backups:
+ ${hostname}:
+ ${pg_cluster}:
+ | EOF
+ tag => $postgres::backup_server::globals::tag_dsa_check_backupp,
+ notify => Exec['update dsa-check-backuppg-manual.conf']
+ }
+}