diff --git a/manifests/postgresql.pp b/manifests/postgresql.pp new file mode 100644 index 0000000..b216cb7 --- /dev/null +++ b/manifests/postgresql.pp @@ -0,0 +1,4 @@ +# Manage a PostgreSQL server +class profile::postgresql { + include profile::postgresql::apt_config +} diff --git a/manifests/postgresql/apt_config.pp b/manifests/postgresql/apt_config.pp new file mode 100644 index 0000000..f111aef --- /dev/null +++ b/manifests/postgresql/apt_config.pp @@ -0,0 +1,25 @@ +# PostgreSQL APT configuration +class profile::postgresql::apt_config { + $pgdg_mirror = hiera('postgresql::apt_config::pgdg::mirror') + $pgdg_key = hiera('postgresql::apt_config::pgdg::key') + $pglogical_mirror = hiera('postgresql::apt_config::pglogical::mirror') + $pglogical_key = hiera('postgresql::apt_config::pglogical::key') + + ::apt::source {'pgdg': + location => $pgdg_mirror, + release => "${::lsbdistcodename}-pgdg", + repos => 'main', + key => { + content => $pgdg_key, + }, + } + + ::apt::source {'pglogical': + location => $pglogical_mirror, + release => "${::lsbdistcodename}-2ndquadrant", + repos => 'main', + key => { + content => $pglogical_key, + }, + } +}