mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-15 17:20:25 +00:00
Updated alternatives solution
This commit is contained in:
parent
43b51148fe
commit
cc30fbb903
4 changed files with 23 additions and 4 deletions
|
@ -27,8 +27,9 @@ postgresql-client-libs:
|
|||
{%- for bin in postgres.client_bins %}
|
||||
{%- set path = salt['file.join'](postgres.bin_dir, bin) %}
|
||||
|
||||
{{ bin }}:
|
||||
postgresql-{{ bin }}-altinstall:
|
||||
alternatives.install:
|
||||
- name: {{ bin }}
|
||||
- link: {{ salt['file.join']('/usr/bin', bin) }}
|
||||
- path: {{ path }}
|
||||
- priority: {{ postgres.linux.altpriority }}
|
||||
|
|
|
@ -14,10 +14,23 @@ install-postgres-libpq-dev:
|
|||
- name: {{ postgres.pkg_libpq_dev }}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
# Alternatives system. Make devclient binaries available in $PATH
|
||||
{%- if 'bin_dir' in postgres and postgres.linux.altpriority %}
|
||||
{%- for bin in postgres.dev_bins %}
|
||||
{%- set path = salt['file.join'](postgres.bin_dir, bin) %}
|
||||
|
||||
postgresql-{{ bin }}-altinstall:
|
||||
alternatives.install:
|
||||
- name: {{ bin }}
|
||||
- link: {{ salt['file.join']('/usr/bin', bin) }}
|
||||
- path: {{ path }}
|
||||
- priority: {{ postgres.linux.altpriority }}
|
||||
- onlyif: test -f {{ path }}
|
||||
|
||||
{% if grains.os == 'MacOS' %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
|
||||
{% elif grains.os == 'MacOS' %}
|
||||
|
||||
# Darwin maxfiles limits
|
||||
{% if postgres.limits.soft or postgres.limits.hard %}
|
||||
|
|
|
@ -56,6 +56,8 @@ RedHat:
|
|||
|
||||
# directory containing PostgreSQL client executables
|
||||
bin_dir: /usr/pgsql-{{ repo.version }}/bin
|
||||
dev_bins:
|
||||
- ecg
|
||||
client_bins:
|
||||
- clusterdb
|
||||
- createdb
|
||||
|
@ -129,6 +131,8 @@ Suse:
|
|||
|
||||
# directory containing PostgreSQL client executables
|
||||
bin_dir: /usr/pgsql-{{ repo.version }}/bin
|
||||
dev_bins:
|
||||
- ecg
|
||||
client_bins:
|
||||
- pg_archivecleanup
|
||||
- pg_config
|
||||
|
|
|
@ -40,8 +40,9 @@ postgresql-server:
|
|||
{%- for bin in postgres.server_bins %}
|
||||
{%- set path = salt['file.join'](postgres.bin_dir, bin) %}
|
||||
|
||||
{{ bin }}:
|
||||
postgresql-{{ bin }}-altinstall:
|
||||
alternatives.install:
|
||||
- name: {{ bin }}
|
||||
- link: {{ salt['file.join']('/usr/bin', bin) }}
|
||||
- path: {{ path }}
|
||||
- priority: {{ postgres.linux.altpriority }}
|
||||
|
|
Loading…
Add table
Reference in a new issue