mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-16 09:40:26 +00:00
Wrap the Postgres conf file in an if-statement; grab source from Pillar
This commit is contained in:
parent
f17fac7a2e
commit
9ac9a4610e
2 changed files with 5 additions and 2 deletions
|
@ -9,3 +9,4 @@ postgres:
|
||||||
db:
|
db:
|
||||||
name: mydb
|
name: mydb
|
||||||
user: mydb
|
user: mydb
|
||||||
|
pg_hba.conf: salt://postgres/pg_hba.conf
|
||||||
|
|
|
@ -13,16 +13,18 @@ postgresql:
|
||||||
- require:
|
- require:
|
||||||
- pkg: {{ postgres.pkg }}
|
- pkg: {{ postgres.pkg }}
|
||||||
|
|
||||||
|
{% if 'pg_hba.conf' in pillar['postgres'] %}
|
||||||
pg_hba.conf:
|
pg_hba.conf:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: {{ postgres.pg_hba }}
|
- name: {{ postgres.pg_hba }}
|
||||||
- source: salt://postgres/pg_hba.conf
|
- source: {{ pillar['postgres']['pg_hba.conf'] }}
|
||||||
- template: jinja
|
- template: jinja
|
||||||
- user: postgres
|
- user: postgres
|
||||||
- group: postgres
|
- group: postgres
|
||||||
- mode: 644
|
- mode: 644
|
||||||
- require:
|
- require:
|
||||||
- pkg: {{ postgres.pkg }}
|
- pkg: {{ postgres.pkg }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
postgres-app-user:
|
postgres-app-user:
|
||||||
postgres_user.present:
|
postgres_user.present:
|
||||||
|
|
Loading…
Add table
Reference in a new issue