Improvements to initdb stuff
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user