Puppet Class: pgprobackup::repo::apt

Defined in:
manifests/repo/apt.pp

Overview

Parameters:

  • baseurl (String) (defaults to: 'https://repo.postgrespro.ru/pg_probackup/deb/')
  • arch (String) (defaults to: 'amd64')


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'manifests/repo/apt.pp', line 2

class pgprobackup::repo::apt (
  String $baseurl = 'https://repo.postgrespro.ru/pg_probackup/deb/',
  String $arch    = 'amd64',
) {
  include apt

  $_keyring = '/usr/share/keyrings/pg_probackup.gpg'
  $_tmp_gpg = '/tmp/pg_probackup.gpg'
  # TODO: Switch to apt::keyring once supported by puppetlabs-apt
  # see: https://github.com/puppetlabs/puppetlabs-apt/pull/1128
  archive { $_tmp_gpg:
    source          => 'https://repo.postgrespro.ru/pg_probackup/keys/GPG-KEY-PG-PROBACKUP',
    extract         => true,
    extract_path    => '/usr/share/keyrings',
    extract_command => 'gpg --dearmor < %s > pg_probackup.gpg',
    creates         => $_keyring,
  }

  apt::source { 'pgprobackup':
    location     => $baseurl,
    release      => $facts['os']['distro']['codename'],
    architecture => $arch,
    repos        => "main-${facts['os']['distro']['codename']}",
    include      => {
      src => $pgprobackup::repo::src,
    },
    keyring      => $_keyring,
    require      => Archive[$_tmp_gpg],
  }
}