mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-10 14:51:46 +00:00
test(repository): redhat's family alternatives for repo url
This commit is contained in:
parent
7bba14a61c
commit
43b4329a51
1 changed files with 10 additions and 3 deletions
|
@ -1,14 +1,21 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
case platform.family
|
||||
when 'redhat', 'fedora'
|
||||
repo_file = '/etc/yum.repos.d/pgdg13.repo'
|
||||
when 'redhat', 'fedora', 'suse'
|
||||
os_name_repo_file = {
|
||||
'opensuse' => '/etc/zypp/repos.d/pgdg-sles-13.repo'
|
||||
}
|
||||
os_name_repo_file.default = '/etc/yum.repos.d/pgdg13.repo'
|
||||
|
||||
os_name_repo_url = {
|
||||
'amazon' => 'https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-7-$basearch',
|
||||
'fedora' => 'https://download.postgresql.org/pub/repos/yum/13/fedora/fedora-$releasever-$basearch',
|
||||
'default' => 'https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-$releasever-$basearch'
|
||||
'opensuse' => 'https://download.postgresql.org/pub/repos/zypp/13/suse/sles-$releasever-$basearch'
|
||||
}
|
||||
os_name_repo_url.default = 'https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-$releasever-$basearch'
|
||||
|
||||
repo_url = os_name_repo_url[platform.name]
|
||||
repo_file = os_name_repo_file[platform.name]
|
||||
|
||||
when 'debian'
|
||||
# Inspec does not provide a `codename` matcher, so we add ours
|
||||
|
|
Loading…
Add table
Reference in a new issue