File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 88
99include:
1010 - postgres.client
11+ {%- if ' server_bins' in postgres and grains[' saltversion' ] == ' 2016.11.0' % }
12+ # FIXME : Salt v2016.11.0 bug https://github.com/saltstack/salt/issues/37935
13+ - postgres.server
14+ {%- endif % }
1115
1216{%- endif % }
1317
Original file line number Diff line number Diff line change @@ -69,6 +69,15 @@ RedHat:
6969 - psql
7070 - reindexdb
7171 - vacuumdb
72+ server_bins :
73+ - initdb
74+ - pg_controldata
75+ - pg_ctl
76+ - pg_resetxlog
77+ - postgres
78+ - postgresql{{ release }}-check-db-dir
79+ - postgresql{{ release }}-setup
80+ - postmaster
7281
7382{% else %}
7483
Original file line number Diff line number Diff line change @@ -92,3 +92,24 @@ postgresql-tablespace-dir-{{ name }}:
9292 - group
9393
9494{%- endfor % }
95+
96+ {%- if ' bin_dir' in postgres % }
97+
98+ # Make server binaries available in $PATH
99+
100+ {%- for bin in postgres.server_bins % }
101+
102+ {%- set path = salt[' file.join' ](postgres.bin_dir, bin ) % }
103+
104+ {{ bin }}:
105+ alternatives.install:
106+ - link: {{ salt[' file.join' ](' /usr/bin' , bin ) }}
107+ - path: {{ path }}
108+ - priority: 30
109+ - onlyif: test - f {{ path }}
110+ - require:
111+ - pkg: postgresql- server
112+
113+ {%- endfor % }
114+
115+ {%- endif % }
You can’t perform that action at this time.
0 commit comments