mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-16 01:30:25 +00:00
Wrap app db creation in an if-statement to check for Pillar values
This commit is contained in:
parent
9ac9a4610e
commit
2bd55a5a16
1 changed files with 2 additions and 0 deletions
|
@ -26,6 +26,7 @@ pg_hba.conf:
|
||||||
- pkg: {{ postgres.pkg }}
|
- pkg: {{ postgres.pkg }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if 'db' in pillar['postgres'] %}
|
||||||
postgres-app-user:
|
postgres-app-user:
|
||||||
postgres_user.present:
|
postgres_user.present:
|
||||||
- name: {{ pillar['postgres']['db']['user'] }}
|
- name: {{ pillar['postgres']['db']['user'] }}
|
||||||
|
@ -46,3 +47,4 @@ postgres-app-db:
|
||||||
- runas: postgres
|
- runas: postgres
|
||||||
- require:
|
- require:
|
||||||
- postgres_user: postgres-app-user
|
- postgres_user: postgres-app-user
|
||||||
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue