mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-17 10:10:31 +00:00
test(repository): use system.platform[:codename]
[skip ci]
Tested: * https://gitlab.com/myii/postgres-formula/-/pipelines/470237956
This commit is contained in:
parent
1270d0c962
commit
1c70c9c01c
1 changed files with 3 additions and 13 deletions
|
@ -18,21 +18,11 @@ when 'redhat', 'fedora', 'suse'
|
||||||
repo_file = os_name_repo_file[platform.name]
|
repo_file = os_name_repo_file[platform.name]
|
||||||
|
|
||||||
when 'debian'
|
when 'debian'
|
||||||
# Inspec does not provide a `codename` matcher, so we add ours
|
|
||||||
finger_codename = {
|
|
||||||
'ubuntu-18.04' => 'bionic',
|
|
||||||
'ubuntu-20.04' => 'focal',
|
|
||||||
'debian-9' => 'stretch',
|
|
||||||
'debian-10' => 'buster',
|
|
||||||
'debian-11' => 'bullseye'
|
|
||||||
}
|
|
||||||
codename = finger_codename[system.platform[:finger]]
|
|
||||||
|
|
||||||
repo_keyring = '/usr/share/postgresql-common/pgdg/apt.postgresql.org.gpg'
|
repo_keyring = '/usr/share/postgresql-common/pgdg/apt.postgresql.org.gpg'
|
||||||
repo_file = '/etc/apt/sources.list.d/pgdg.list'
|
repo_file = '/etc/apt/sources.list.d/pgdg.list'
|
||||||
# rubocop:disable Metrics/LineLength
|
# rubocop:disable Layout/LineLength
|
||||||
repo_url = "deb [signed-by=#{repo_keyring}] http://apt.postgresql.org/pub/repos/apt #{codename}-pgdg main"
|
repo_url = "deb [signed-by=#{repo_keyring}] http://apt.postgresql.org/pub/repos/apt #{system.platform[:codename]}-pgdg main"
|
||||||
# rubocop:enable Metrics/LineLength
|
# rubocop:enable Layout/LineLength
|
||||||
end
|
end
|
||||||
|
|
||||||
control 'Postgresql repository keyring' do
|
control 'Postgresql repository keyring' do
|
||||||
|
|
Loading…
Add table
Reference in a new issue