Merge pull request #201 from noelmcloughlin/fedora2

Use osmap for OS handling of fedora repo
This commit is contained in:
N 2018-03-31 20:15:34 +01:00 committed by GitHub
commit 43b51148fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 7 deletions

View file

@ -1,5 +1,6 @@
{% import_yaml "postgres/defaults.yaml" as defaults %}
{% import_yaml "postgres/osfamilymap.yaml" as osfamilymap %}
{% import_yaml "postgres/osmap.yaml" as osmap %}
{% import_yaml "postgres/codenamemap.yaml" as oscodenamemap %}
{% set postgres = salt['grains.filter_by'](
@ -8,9 +9,13 @@
osfamilymap,
grain='os_family',
merge=salt['grains.filter_by'](
oscodenamemap,
grain='oscodename',
merge=salt['pillar.get']('postgres', {}),
osmap,
grain='os',
merge=salt['grains.filter_by'](
oscodenamemap,
grain='oscodename',
merge=salt['pillar.get']('postgres', {}),
),
),
),
base='postgres',

View file

@ -34,11 +34,7 @@ RedHat:
humanname: PostgreSQL {{ repo.version }} $releasever - $basearch
gpgcheck: 1
gpgkey: 'https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-{{ release }}'
{% if grains.os == 'Fedora' %}
baseurl: 'https://download.postgresql.org/pub/repos/yum/{{ repo.version }}/fedora/fedora-$releasever-$basearch'
{% else %}
baseurl: 'https://download.postgresql.org/pub/repos/yum/{{ repo.version }}/redhat/rhel-$releasever-$basearch'
{% endif %}
{% if repo.use_upstream_repo == true %}
{% set data_dir = '/var/lib/pgsql/' ~ repo.version ~ '/data' %}

7
postgres/osmap.yaml Normal file
View file

@ -0,0 +1,7 @@
{% import_yaml "postgres/repo.yaml" as repo %}
Fedora:
pkg_repo:
baseurl: 'https://download.postgresql.org/pub/repos/yum/{{ repo.version }}/fedora/fedora-$releasever-$basearch'
# vim: ft=sls