mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-16 09:40:26 +00:00

which control three things: 1. should we initialize? 2. if so, how? 3. what environment variables and user to use The approach taken is very similar to what the Apache formula uses, namely: a default dictionary which is over-ridden by: os-specific defaults, then os codename defaults, then os finger defaults, and finally user-specified pillar values - this also adds support for grains['osfinger']
40 lines
1,003 B
YAML
40 lines
1,003 B
YAML
RedHat:
|
|
pkg: postgresql-server
|
|
pkg_client: postgresql
|
|
pkg_repo: pgdg94
|
|
repo_baseurl: http://yum.postgresql.org/9.4/redhat/rhel-$releasever-$basearch
|
|
prepare_cluster:
|
|
test: test -f /var/lib/pgsql/data/PG_VERSION
|
|
env:
|
|
LC_ALL: C.UTF-8
|
|
{% if grains['os_family'] == 'RedHat' %}
|
|
{% if grains['osmajorrelease'] >= 7 %}
|
|
PGSETUP_INITDB_OPTIONS:
|
|
user: root
|
|
command: postgresql-setup initdb
|
|
{% else %}
|
|
user: postgres
|
|
command: initdb -D /var/lib/pgsql/data
|
|
{% endif %}
|
|
{% endif %}
|
|
Arch:
|
|
conf_dir: /var/lib/postgres/data
|
|
prepare_cluster:
|
|
user: postgres
|
|
command: initdb -D /var/lib/postgresql/data
|
|
test: test -f /var/lib/postgres/data/PG_VERSION
|
|
env:
|
|
LC_ALL: C.UTF-8
|
|
pkg_client: postgresql
|
|
pkg_dev: postgresql
|
|
Debian:
|
|
pkg_repo_file: /etc/apt/sources.list.d/pgdg.list
|
|
pkg_dev: postgresql-server-dev-all
|
|
pkg_libpq_dev: libpq-dev
|
|
Suse:
|
|
pkg: postgresql-server
|
|
pkg_client: postgresql
|
|
FreeBSD:
|
|
user: pgsql
|
|
OpenBSD:
|
|
user: _postgresql
|