-
Notifications
You must be signed in to change notification settings - Fork 282
/
Copy pathosfamilymap.yaml
229 lines (205 loc) · 5.52 KB
/
osfamilymap.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
{% import_yaml "postgres/repo.yaml" as repo %}
{% set release = repo.version|replace('.', '') %}
Arch:
use_upstream_repo: false
conf_dir: /var/lib/postgres/data
data_dir: /var/lib/postgres/data
pkg_client: postgresql-libs
pkg_dev: postgresql
Debian:
pkgs_deps: ['python3-apt']
pkg_repo:
humanname: PostgreSQL Official Repository
file: /etc/apt/sources.list.d/pgdg.list
pkg_repo_keyring: 'https://download.postgresql.org/pub/repos/apt/pool/main/p/pgdg-keyring/pgdg-keyring_2018.2_all.deb'
pkg_repo_keyid: ACCC4CF8
{% if repo.use_upstream_repo == true %}
pkg_dev: ''
{% else %}
pkg_dev: postgresql-server-dev-all
{% endif %}
FreeBSD:
{% if repo.version|float >= 9.6 %}
user: &freebsd-user postgres
group: &freebsd-group postgres
conf_dir: {{ '/var/db/postgres/data' ~ release }}
data_dir: {{ '/var/db/postgres/data' ~ release }}
{% else %}
user: &freebsd-user pgsql
group: &freebsd-group pgsql
conf_dir: /usr/local/pgsql/data
data_dir: /usr/local/pgsql/data
{% endif %}
pkg_libpq_dev: null #not in freebsd
pkg_client: postgresql{{ release }}-client
pkg: postgresql{{ release }}-server
prepare_cluster:
user: *freebsd-user
group: *freebsd-group
service:
flags: -w -s -m fast
sysrc: True
OpenBSD:
conf_dir: /var/postgresql/data
data_dir: /var/postgresql/data
user: _postgresql
service:
flags: -w -s -m fast
sysrc: True
RedHat:
pkg_repo:
name: pgdg{{ release }}
humanname: PostgreSQL {{ repo.version }} $releasever - $basearch
gpgcheck: 1
gpgkey: 'https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-{{ release }}'
baseurl: 'https://download.postgresql.org/pub/repos/yum/{{ repo.version }}/redhat/rhel-$releasever-$basearch'
pkgs_deps:
- libicu
{%- if grains.get('osmajorrelease', 0) == 7 %}
- systemd-sysv
{%- endif %}
pkg_python: python3-psycopg2
{% if repo.use_upstream_repo == true %}
{% set data_dir = '/var/lib/pgsql/' ~ repo.version ~ '/data' %}
fromrepo: pgdg{{ release }}
pkg: postgresql{{ release }}-server
pkg_client: postgresql{{ release }}
pkg_libs: postgresql{{ release }}-libs
pkg_dev: postgresql{{ release }}-devel
conf_dir: {{ data_dir }}
data_dir: {{ data_dir }}
service:
name: postgresql-{{ repo.version }}
# Alternatives system
linux:
altpriority: 30
# directory containing PostgreSQL client executables
bin_dir: /usr/pgsql-{{ repo.version }}/bin
dev_bins:
- ecg
client_bins:
- clusterdb
- createdb
- createlang
- createuser
- dropdb
- droplang
- dropuser
- pg_archivecleanup
- pg_basebackup
- pg_config
- pg_dump
- pg_dumpall
- pg_isready
- pg_receivexlog
- pg_restore
- pg_rewind
- pg_test_fsync
- pg_test_timing
- pg_upgrade
- pg_xlogdump
- pgbench
- psql
- reindexdb
- vacuumdb
server_bins:
- initdb
- pg_controldata
- pg_ctl
- pg_resetxlog
- postgres
- postgresql{{ release }}-check-db-dir
- postgresql{{ release }}-setup
- postmaster
{% else %}
pkg: postgresql-server
pkg_client: postgresql
{% endif %}
pkg_libpq_dev: libpqxx-devel
pkg_dev_deps:
- perl-Time-HiRes
- libicu-devel
- perl-IPC-Run
- perl-Test-Simple
Suse:
pkg_repo:
name: pgdg-sles-{{ release }}
humanname: PostgreSQL {{ repo.version }} $releasever - $basearch
# works for postgres 11 onwards
baseurl: 'https://download.postgresql.org/pub/repos/zypp/{{ repo.version }}/suse/sles-$releasever-$basearch'
gpgkey: 'https://download.postgresql.org/pub/repos/zypp/{{ repo.version }}/suse/sles-$releasever-$basearch/repodata/repomd.xml.key'
gpgcheck: 1
gpgautoimport: True
{% if repo.use_upstream_repo == true %}
{% set data_dir = '/var/lib/pgsql/' ~ repo.version ~ '/data' %}
fromrepo: pgdg-sles-{{ release }}
pkg: postgresql{{ release }}-server
pkg_client: postgresql{{ release }}
pkg_dev: postgresql{{ release }}-devel
pkg_libs: postgresql{{ release }}-libs
conf_dir: {{ data_dir }}
data_dir: {{ data_dir }}
service:
name: postgresql-{{ repo.version }}
# Alternatives system
linux:
altpriority: 30
# directory containing PostgreSQL client executables
bin_dir: /usr/pgsql-{{ repo.version }}/bin
dev_bins:
- ecg
client_bins:
- pg_archivecleanup
- pg_config
- pg_isready
- pg_receivexlog
- pg_rewind
- pg_test_fsync
- pg_test_timing
- pg_upgrade
- pg_xlogdump
- pgbench
server_bins:
- initdb
- pg_controldata
- pg_ctl
- pg_resetxlog
- postgres
- postgresql{{ release }}-check-db-dir
- postgresql{{ release }}-setup
- postmaster
{% else %}
pkg: postgresql-server
pkg_client: postgresql
{% endif %}
pkg_libpq_dev: libpqxx
{%- if grains.os == 'MacOS' %}
## jinja check avoids rendering noise/failure on Linux
MacOS:
{%- if repo.use_upstream_repo == 'homebrew' %}
service:
name: homebrew.mxcl.postgresql
{%- elif repo.use_upstream_repo == 'postgresapp' %}
service:
name: com.postgresapp.Postgres2
{%- endif %}
pkg: postgresql
pkg_client:
pkg_libpq_dev:
userhomes: /Users
user: {{ repo.user }}
group: {{ repo.group }}
conf_dir: /Users/{{ repo.user }}/Library/AppSupport/postgres_{{ repo.use_upstream_repo }}
data_dir: /Users/{{ repo.user }}/Library/AppSupport/postgres_{{ repo.use_upstream_repo }}
prepare_cluster:
user: {{ repo.user }}
group: {{ repo.group }}
# macos limits
limits:
soft: 64000
hard: 64000
{%- endif %}
# vim: ft=sls