X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fpostgresql%2Fmanifests%2Frepo%2Fapt_postgresql_org.pp;fp=3rdparty%2Fmodules%2Fpostgresql%2Fmanifests%2Frepo%2Fapt_postgresql_org.pp;h=1bbf62048af2f0a2b4f36d5d7722019b82a41b07;hb=a69999e580f8b3abd12446c2d6ad59e517651813;hp=0000000000000000000000000000000000000000;hpb=e7b6b352165009c385c52fcfe5a1055690dbfa4b;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/postgresql/manifests/repo/apt_postgresql_org.pp b/3rdparty/modules/postgresql/manifests/repo/apt_postgresql_org.pp new file mode 100644 index 000000000..1bbf62048 --- /dev/null +++ b/3rdparty/modules/postgresql/manifests/repo/apt_postgresql_org.pp @@ -0,0 +1,32 @@ +# PRIVATE CLASS: do not use directly +class postgresql::repo::apt_postgresql_org inherits postgresql::repo { + include ::apt + + # Here we have tried to replicate the instructions on the PostgreSQL site: + # + # http://www.postgresql.org/download/linux/debian/ + # + $default_baseurl = 'https://apt.postgresql.org/pub/repos/apt/' + + $_baseurl = pick($postgresql::repo::baseurl, $default_baseurl) + + apt::pin { 'apt_postgresql_org': + originator => 'apt.postgresql.org', + priority => 500, + } + -> apt::source { 'apt.postgresql.org': + location => $_baseurl, + release => "${::lsbdistcodename}-pgdg", + repos => "main ${postgresql::repo::version}", + key => { + id => 'B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8', + source => 'https://www.postgresql.org/media/keys/ACCC4CF8.asc', + }, + include => { + src => false, + }, + } + + Apt::Source['apt.postgresql.org']->Package<|tag == 'postgresql'|> + Class['Apt::Update'] -> Package<|tag == 'postgresql'|> +}