ensure_packages(["postgresql"])
- $pg_backup_hosts = ["cryptoportfolio-dev.immae.eu"]
+ $pg_backup_hosts = ["cryptoportfolio-dev.immae.eu", "cryptoportfolio.immae.eu"]
$pg_backup_hosts.each |$pg_backup_host| {
$pg_path = "$mountpoint/$pg_backup_host/postgresql"
postgresql_version => "10",
}
+ $primary_conninfo = "host=$pg_host port=$pg_port user=$ldap_cn password=$ldap_password sslmode=require"
+ $primary_slot_name = regsubst($ldap_cn, '-', "_", "G")
+ $standby_mode = "on"
+
concat { "$pg_path/recovery.conf":
owner => $pg_user,
group => $pg_group,
mode => '0640',
warn => true,
}
- postgresql::server::recovery { "$pg_backup_host recovery":
- primary_conninfo => "host=$pg_host port=$pg_port user=$ldap_cn password=$ldap_password sslmode=require",
- primary_slot_name => regsubst($ldap_cn, '-', "_", "G"),
- standby_mode => "on",
- target => "$pg_path/recovery.conf",
+ concat::fragment { "$pg_path/recovery.conf":
+ target => "$pg_path/recovery.conf",
+ content => template('postgresql/recovery.conf.erb'),
}
file { "$pg_path/postgresql.conf":