|
1 | 1 | # Bolt task acceptance test setup |
2 | 2 |
|
3 | | -# There are no packages for Debian 12 and Ubuntu 24.04 (noble) yet... |
4 | | -# Install puppet-tools from previous version in this case |
5 | | -case [$facts.get('os.name'), $facts.get('os.distro.release.major')] { |
6 | | - ['Debian', '12']: { |
7 | | - apt::source { 'puppet-tools-bullseye': |
8 | | - location => 'http://apt.puppet.com', |
9 | | - release => 'bullseye', |
10 | | - repos => 'puppet-tools', |
11 | | - key => { |
12 | | - 'source' => 'https://apt.puppet.com/keyring.gpg', |
13 | | - 'name' => 'puppet.gpg', |
14 | | - }, |
15 | | - before => Package['puppet-bolt'], |
16 | | - } |
17 | | - } |
18 | | - ['Ubuntu', '24.04']: { |
19 | | - apt::source { 'puppet-tools-jammy': |
20 | | - location => 'http://apt.puppet.com', |
21 | | - release => 'jammy', |
22 | | - repos => 'puppet-tools', |
23 | | - key => { |
24 | | - 'source' => 'https://apt.puppet.com/keyring.gpg', |
25 | | - 'name' => 'puppet.gpg', |
26 | | - }, |
27 | | - before => Package['puppet-bolt'], |
28 | | - } |
29 | | - } |
30 | | - default: {} |
31 | | -} |
| 3 | +# We use aptly APT repository in acceptance tests |
| 4 | +# Below is their GPG key ID |
| 5 | +$aptly_gpg_key = 'EE727D4449467F0E' |
32 | 6 |
|
33 | | -package { ['puppet-bolt', 'gpg']: ensure => 'installed' } |
| 7 | +# Install packages required |
| 8 | +package { ['openbolt', 'gpg']: ensure => 'installed' } |
34 | 9 |
|
35 | 10 | $puppetlabs_dir = '/root/.puppetlabs' |
36 | | -$aptly_gpg_key = 'EE727D4449467F0E' |
37 | | - |
38 | 11 | $bolt_project = { |
39 | 12 | modulepath => '/etc/puppetlabs/code/modules:/etc/puppetlabs/code/environments/production/modules', |
40 | 13 | analytics => false, |
|
53 | 26 | content => $bolt_project.stdlib::to_yaml, |
54 | 27 | } |
55 | 28 |
|
| 29 | +# Pre-import aptly APT repository GPG key to use in tests |
56 | 30 | exec { 'import_aptly_gpg_key': |
57 | 31 | path => '/bin:/sbin:/usr/bin:/usr/sbin', |
58 | 32 | command => "gpg --no-default-keyring --keyring /root/keyring_for_tasks.gpg --keyserver keyserver.ubuntu.com --recv-keys ${aptly_gpg_key}", |
|
0 commit comments