mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-16 01:30:25 +00:00
Merge pull request #132 from vutny/workaround-salt-bug-37935
Workaround a bug in saltstack/salt#37935 for release v2016.11.0
This commit is contained in:
commit
663db90006
3 changed files with 34 additions and 0 deletions
|
@ -8,6 +8,10 @@
|
|||
|
||||
include:
|
||||
- postgres.client
|
||||
{%- if 'server_bins' in postgres and grains['saltversion'] == '2016.11.0' %}
|
||||
# FIXME: Salt v2016.11.0 bug https://github.com/saltstack/salt/issues/37935
|
||||
- postgres.server
|
||||
{%- endif %}
|
||||
|
||||
{%- endif %}
|
||||
|
||||
|
|
|
@ -69,6 +69,15 @@ RedHat:
|
|||
- psql
|
||||
- reindexdb
|
||||
- vacuumdb
|
||||
server_bins:
|
||||
- initdb
|
||||
- pg_controldata
|
||||
- pg_ctl
|
||||
- pg_resetxlog
|
||||
- postgres
|
||||
- postgresql{{ release }}-check-db-dir
|
||||
- postgresql{{ release }}-setup
|
||||
- postmaster
|
||||
|
||||
{% else %}
|
||||
|
||||
|
|
|
@ -92,3 +92,24 @@ postgresql-tablespace-dir-{{ name }}:
|
|||
- group
|
||||
|
||||
{%- endfor %}
|
||||
|
||||
{%- if 'bin_dir' in postgres %}
|
||||
|
||||
# Make server binaries available in $PATH
|
||||
|
||||
{%- for bin in postgres.server_bins %}
|
||||
|
||||
{%- set path = salt['file.join'](postgres.bin_dir, bin) %}
|
||||
|
||||
{{ bin }}:
|
||||
alternatives.install:
|
||||
- link: {{ salt['file.join']('/usr/bin', bin) }}
|
||||
- path: {{ path }}
|
||||
- priority: 30
|
||||
- onlyif: test -f {{ path }}
|
||||
- require:
|
||||
- pkg: postgresql-server
|
||||
|
||||
{%- endfor %}
|
||||
|
||||
{%- endif %}
|
||||
|
|
Loading…
Add table
Reference in a new issue