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 8
8
9
9
include:
10
10
- 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 % }
11
15
12
16
{%- endif % }
13
17
Original file line number Diff line number Diff line change @@ -69,6 +69,15 @@ RedHat:
69
69
- psql
70
70
- reindexdb
71
71
- 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
72
81
73
82
{% else %}
74
83
Original file line number Diff line number Diff line change @@ -92,3 +92,24 @@ postgresql-tablespace-dir-{{ name }}:
92
92
- group
93
93
94
94
{%- 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