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
|
||||
service: postgresql
|
||||
conf_dir: /var/lib/pgsql/data
|
||||
runtime_dir: /var/lib/pgsql/data
|
||||
create_cluster: False
|
||||
init_db: False
|
||||
version: 9.1
|
||||
|
@ -21,5 +22,6 @@ postgres:
|
|||
commands:
|
||||
initdb: service postgresql initdb
|
||||
initdb_user: root
|
||||
initdb_args: --data-checksum
|
||||
user: postgres
|
||||
group: postgres
|
||||
|
|
|
@ -32,8 +32,8 @@ postgresql-initdb:
|
|||
cmd.run:
|
||||
- cwd: /
|
||||
- user: {{ postgres.initdb_user }}
|
||||
- name: {{ postgres.commands.initdb }}
|
||||
- unless: test -f {{ postgres.conf_dir }}/postgresql.conf
|
||||
- name: {{ postgres.commands.initdb }} {{ postgres.initdb_args }} -D {{ postgres.runtime_dir }}
|
||||
- unless: test -f {{ postgres.runtime_dir }}/PG_VERSION
|
||||
- env:
|
||||
LC_ALL: C.UTF-8
|
||||
{% endif %}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
RedHat:
|
||||
init_db: True
|
||||
commands:
|
||||
initdb: initdb /var/lib/pgsql/data
|
||||
initdb: initdb
|
||||
initdb_user: postgres
|
||||
pkg: postgresql-server
|
||||
pkg_client: postgresql
|
||||
pkg_repo: pgdg94
|
||||
|
@ -11,8 +12,10 @@ Debian:
|
|||
pkg_repo_file: /etc/apt/sources.list.d/pgdg.list
|
||||
pkg_libpq_dev: libpq-dev
|
||||
Suse:
|
||||
init_db: True
|
||||
commands:
|
||||
initdb: initdb /var/lib/pgsql/data
|
||||
initdb: initdb
|
||||
initdb_user: postgres
|
||||
pkg: postgresql-server
|
||||
pkg_client: postgresql
|
||||
FreeBSD:
|
||||
|
|
Loading…
Add table
Reference in a new issue