ssh::keygen {'postgres': }
- if $::hostname in [melartin, vittoria] {
+ if $::hostname in [vittoria] {
postgres::backup_cluster { $::hostname:
pg_version => '9.6',
}
}
}
- if $::hostname in [melartin, vittoria, godard, buxtehude, danzi, postgresql-manda-01] {
+ if $::hostname in [vittoria, godard, buxtehude, danzi, postgresql-manda-01] {
postgres::backup_server::register_backup_clienthost { "backup-clienthost-${::fqdn}}":
}
}
--- /dev/null
+#
+# postgresql server role
+#
+class roles::postgresql::server {
+ include postgres::backup_source
+
+ $clusters = $facts['postgresql_clusters']
+ $clusters.each |$cluster| {
+ # Do not backup clusters that are replication targets,
+ # like the dak mirror or snapshot secondaries
+ if ! $cluster['status']['recovery'] {
+ postgres::backup_cluster { $::hostname:
+ pg_version => $cluster['version'],
+ pg_cluster => $cluster['cluster'],
+ pg_port => $cluster['port'],
+ }
+ }
+ }
+
+ postgres::backup_server::register_backup_clienthost { "backup-clienthost-${::fqdn}}":
+ }
+}