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:
@@ -8,6 +8,10 @@
|
|||||||
|
|
||||||
include:
|
include:
|
||||||
- postgres.client
|
- 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 %}
|
{%- endif %}
|
||||||
|
|
||||||
|
|||||||
@@ -69,6 +69,15 @@ RedHat:
|
|||||||
- psql
|
- psql
|
||||||
- reindexdb
|
- reindexdb
|
||||||
- vacuumdb
|
- vacuumdb
|
||||||
|
server_bins:
|
||||||
|
- initdb
|
||||||
|
- pg_controldata
|
||||||
|
- pg_ctl
|
||||||
|
- pg_resetxlog
|
||||||
|
- postgres
|
||||||
|
- postgresql{{ release }}-check-db-dir
|
||||||
|
- postgresql{{ release }}-setup
|
||||||
|
- postmaster
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
|
|||||||
@@ -92,3 +92,24 @@ postgresql-tablespace-dir-{{ name }}:
|
|||||||
- group
|
- group
|
||||||
|
|
||||||
{%- endfor %}
|
{%- 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 %}
|
||||||
|
|||||||
Reference in New Issue
Block a user