Skip configuring ACLs in `pg_hba.conf` if not provided

This commit is contained in:
Denys Havrysh
2017-01-12 11:34:41 +02:00
parent 7aacf9816f
commit 69a59b6f63
2 changed files with 11 additions and 4 deletions

View File

@@ -93,13 +93,17 @@ postgresql-conf:
postgresql-pg_hba:
file.managed:
- name: {{ postgres.conf_dir }}/pg_hba.conf
- source: {{ postgres['pg_hba.conf'] }}
- template: jinja
- user: {{ postgres.user }}
- group: {{ postgres.group }}
- mode: 600
{%- if postgres.acls %}
- source: {{ postgres['pg_hba.conf'] }}
- template: jinja
- defaults:
acls: {{ postgres.acls }}
{%- else %}
- replace: False
{%- endif %}
- require:
- file: postgresql-config-dir