From: Peter Palfrader Date: Mon, 30 Sep 2019 05:45:08 +0000 (+0200) Subject: pg config on ullmann, pt 1 X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=4bb48877971815cfb15bc52803bd4c5f0b5f34e4;p=mirror%2Fdsa-puppet.git pg config on ullmann, pt 1 --- diff --git a/data/nodes/ullmann.debian.org.yaml b/data/nodes/ullmann.debian.org.yaml index ed63f4047..03028e8b7 100644 --- a/data/nodes/ullmann.debian.org.yaml +++ b/data/nodes/ullmann.debian.org.yaml @@ -1,3 +1,7 @@ --- classes: - roles::udd + - roles::postgresql::server + +# roles::postgresql::server::manage_clusters_hba: true +roles::postgresql::server::backups: false diff --git a/modules/roles/manifests/postgresql/server.pp b/modules/roles/manifests/postgresql/server.pp index fd8f9164b..3b6dfcb2d 100644 --- a/modules/roles/manifests/postgresql/server.pp +++ b/modules/roles/manifests/postgresql/server.pp @@ -1,9 +1,11 @@ # # postgresql server role # -# @param manage_clusters_hba manage clusters' pg_hba.conf using postgres::cluster. Eventually should should be true for every host and we can drop the param +# @param manage_clusters_hba manage clusters' pg_hba.conf using postgres::cluster. Eventually should should be true for every host and we can drop the param +# @param backups Do backups of the database clusters on this host class roles::postgresql::server( Variant[Boolean,Array[Integer]] $manage_clusters_hba = false, + Boolean $backups = true, ) { $clusters = $facts['postgresql_clusters'] $clusters.each |$cluster| { @@ -21,6 +23,7 @@ class roles::postgresql::server( pg_cluster => $cluster_name, pg_port => $port, manage_hba => $hba, + backups => $backups, } } }