mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-15 17:20:25 +00:00
Merge pull request #231 from myii/patch-1
Fix `conf_dir` => `data_dir` required for preparing cluster
This commit is contained in:
commit
007d639a6e
1 changed files with 7 additions and 5 deletions
|
@ -62,7 +62,7 @@ postgresql-{{ bin }}-altinstall:
|
|||
|
||||
postgresql-cluster-prepared:
|
||||
file.directory:
|
||||
- name: {{ postgres.conf_dir }}
|
||||
- name: {{ postgres.data_dir }}
|
||||
- user: {{ postgres.user }}
|
||||
- group: {{ postgres.group }}
|
||||
- makedirs: True
|
||||
|
@ -81,10 +81,12 @@ postgresql-cluster-prepared:
|
|||
{%- endif %}
|
||||
- cwd: /
|
||||
- env: {{ postgres.prepare_cluster.env }}
|
||||
- runas: {{ postgres.user }}
|
||||
- runas: {{ postgres.prepare_cluster.user }}
|
||||
- require:
|
||||
- pkg: postgresql-server
|
||||
- file: postgresql-cluster-prepared
|
||||
- watch_in:
|
||||
- module: postgresql-service-restart
|
||||
|
||||
postgresql-config-dir:
|
||||
file.directory:
|
||||
|
@ -140,15 +142,15 @@ postgresql-conf:
|
|||
- watch_in:
|
||||
- module: postgresql-service-restart
|
||||
|
||||
{%- endif %}
|
||||
|
||||
# Restart the service where reloading is not sufficient
|
||||
# Currently only when changes are made to `postgresql.conf`
|
||||
# Currently when the cluster is created or changes made to `postgresql.conf`
|
||||
postgresql-service-restart:
|
||||
module.wait:
|
||||
- name: service.restart
|
||||
- m_name: {{ postgres.service }}
|
||||
|
||||
{%- endif %}
|
||||
|
||||
{%- set pg_hba_path = salt['file.join'](postgres.conf_dir, 'pg_hba.conf') %}
|
||||
|
||||
postgresql-pg_hba:
|
||||
|
|
Loading…
Add table
Reference in a new issue