mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-17 10:10:31 +00:00
Improvements to initdb stuff
This commit is contained in:
parent
8a4eb569f4
commit
e4bb5bf133
3 changed files with 9 additions and 4 deletions
|
@ -7,6 +7,7 @@ postgres:
|
||||||
python: python-psycopg2
|
python: python-psycopg2
|
||||||
service: postgresql
|
service: postgresql
|
||||||
conf_dir: /var/lib/pgsql/data
|
conf_dir: /var/lib/pgsql/data
|
||||||
|
runtime_dir: /var/lib/pgsql/data
|
||||||
create_cluster: False
|
create_cluster: False
|
||||||
init_db: False
|
init_db: False
|
||||||
version: 9.1
|
version: 9.1
|
||||||
|
@ -21,5 +22,6 @@ postgres:
|
||||||
commands:
|
commands:
|
||||||
initdb: service postgresql initdb
|
initdb: service postgresql initdb
|
||||||
initdb_user: root
|
initdb_user: root
|
||||||
|
initdb_args: --data-checksum
|
||||||
user: postgres
|
user: postgres
|
||||||
group: postgres
|
group: postgres
|
||||||
|
|
|
@ -32,8 +32,8 @@ postgresql-initdb:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- cwd: /
|
- cwd: /
|
||||||
- user: {{ postgres.initdb_user }}
|
- user: {{ postgres.initdb_user }}
|
||||||
- name: {{ postgres.commands.initdb }}
|
- name: {{ postgres.commands.initdb }} {{ postgres.initdb_args }} -D {{ postgres.runtime_dir }}
|
||||||
- unless: test -f {{ postgres.conf_dir }}/postgresql.conf
|
- unless: test -f {{ postgres.runtime_dir }}/PG_VERSION
|
||||||
- env:
|
- env:
|
||||||
LC_ALL: C.UTF-8
|
LC_ALL: C.UTF-8
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
RedHat:
|
RedHat:
|
||||||
init_db: True
|
init_db: True
|
||||||
commands:
|
commands:
|
||||||
initdb: initdb /var/lib/pgsql/data
|
initdb: initdb
|
||||||
|
initdb_user: postgres
|
||||||
pkg: postgresql-server
|
pkg: postgresql-server
|
||||||
pkg_client: postgresql
|
pkg_client: postgresql
|
||||||
pkg_repo: pgdg94
|
pkg_repo: pgdg94
|
||||||
|
@ -11,8 +12,10 @@ Debian:
|
||||||
pkg_repo_file: /etc/apt/sources.list.d/pgdg.list
|
pkg_repo_file: /etc/apt/sources.list.d/pgdg.list
|
||||||
pkg_libpq_dev: libpq-dev
|
pkg_libpq_dev: libpq-dev
|
||||||
Suse:
|
Suse:
|
||||||
|
init_db: True
|
||||||
commands:
|
commands:
|
||||||
initdb: initdb /var/lib/pgsql/data
|
initdb: initdb
|
||||||
|
initdb_user: postgres
|
||||||
pkg: postgresql-server
|
pkg: postgresql-server
|
||||||
pkg_client: postgresql
|
pkg_client: postgresql
|
||||||
FreeBSD:
|
FreeBSD:
|
||||||
|
|
Loading…
Add table
Reference in a new issue