mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-16 17:50:27 +00:00
only run initdb/prepare cmd if asked for it, and let it run by default.
This commit is contained in:
parent
809faa4734
commit
6de97ce0f1
2 changed files with 3 additions and 0 deletions
|
@ -16,6 +16,7 @@ postgres:
|
||||||
group: postgres
|
group: postgres
|
||||||
|
|
||||||
prepare_cluster:
|
prepare_cluster:
|
||||||
|
run: True
|
||||||
pgcommand: initdb -D
|
pgcommand: initdb -D
|
||||||
pgtestfile: PG_VERSION
|
pgtestfile: PG_VERSION
|
||||||
user: postgres
|
user: postgres
|
||||||
|
|
|
@ -67,6 +67,7 @@ postgresql-cluster-prepared:
|
||||||
- recurse:
|
- recurse:
|
||||||
- user
|
- user
|
||||||
- group
|
- group
|
||||||
|
{%- if postgres.prepare_cluster.run %}
|
||||||
cmd.run:
|
cmd.run:
|
||||||
{%- if postgres.prepare_cluster.command is defined %}
|
{%- if postgres.prepare_cluster.command is defined %}
|
||||||
{# support for depreciated 'prepare_cluster.command' pillar #}
|
{# support for depreciated 'prepare_cluster.command' pillar #}
|
||||||
|
@ -84,6 +85,7 @@ postgresql-cluster-prepared:
|
||||||
- file: postgresql-cluster-prepared
|
- file: postgresql-cluster-prepared
|
||||||
- watch_in:
|
- watch_in:
|
||||||
- module: postgresql-service-restart
|
- module: postgresql-service-restart
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
postgresql-config-dir:
|
postgresql-config-dir:
|
||||||
file.directory:
|
file.directory:
|
||||||
|
|
Loading…
Add table
Reference in a new issue