mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-16 01:30:25 +00:00
Merge pull request #201 from noelmcloughlin/fedora2
Use osmap for OS handling of fedora repo
This commit is contained in:
commit
43b51148fe
3 changed files with 15 additions and 7 deletions
|
@ -1,5 +1,6 @@
|
||||||
{% import_yaml "postgres/defaults.yaml" as defaults %}
|
{% import_yaml "postgres/defaults.yaml" as defaults %}
|
||||||
{% import_yaml "postgres/osfamilymap.yaml" as osfamilymap %}
|
{% import_yaml "postgres/osfamilymap.yaml" as osfamilymap %}
|
||||||
|
{% import_yaml "postgres/osmap.yaml" as osmap %}
|
||||||
{% import_yaml "postgres/codenamemap.yaml" as oscodenamemap %}
|
{% import_yaml "postgres/codenamemap.yaml" as oscodenamemap %}
|
||||||
|
|
||||||
{% set postgres = salt['grains.filter_by'](
|
{% set postgres = salt['grains.filter_by'](
|
||||||
|
@ -8,9 +9,13 @@
|
||||||
osfamilymap,
|
osfamilymap,
|
||||||
grain='os_family',
|
grain='os_family',
|
||||||
merge=salt['grains.filter_by'](
|
merge=salt['grains.filter_by'](
|
||||||
oscodenamemap,
|
osmap,
|
||||||
grain='oscodename',
|
grain='os',
|
||||||
merge=salt['pillar.get']('postgres', {}),
|
merge=salt['grains.filter_by'](
|
||||||
|
oscodenamemap,
|
||||||
|
grain='oscodename',
|
||||||
|
merge=salt['pillar.get']('postgres', {}),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
base='postgres',
|
base='postgres',
|
||||||
|
|
|
@ -34,11 +34,7 @@ RedHat:
|
||||||
humanname: PostgreSQL {{ repo.version }} $releasever - $basearch
|
humanname: PostgreSQL {{ repo.version }} $releasever - $basearch
|
||||||
gpgcheck: 1
|
gpgcheck: 1
|
||||||
gpgkey: 'https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-{{ release }}'
|
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'
|
baseurl: 'https://download.postgresql.org/pub/repos/yum/{{ repo.version }}/redhat/rhel-$releasever-$basearch'
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if repo.use_upstream_repo == true %}
|
{% if repo.use_upstream_repo == true %}
|
||||||
{% set data_dir = '/var/lib/pgsql/' ~ repo.version ~ '/data' %}
|
{% set data_dir = '/var/lib/pgsql/' ~ repo.version ~ '/data' %}
|
||||||
|
|
7
postgres/osmap.yaml
Normal file
7
postgres/osmap.yaml
Normal 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
|
Loading…
Add table
Reference in a new issue