mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-15 17:20:25 +00:00
Add OS grain filter_by. Move Fedora to osmap
This commit is contained in:
parent
7783058767
commit
70491364bd
3 changed files with 15 additions and 7 deletions
|
@ -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',
|
||||
|
|
|
@ -30,11 +30,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
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