Switched to safe dictionary lookup methods

Fixes #10
This commit is contained in:
Seth House 2014-05-29 13:01:39 -06:00
parent 23b9c22398
commit 10e8fa89ba

View file

@ -11,7 +11,7 @@ postgresql:
- require:
- pkg: {{ postgres.pkg }}
{% if 'pg_hba.conf' in pillar['postgres'] %}
{% if 'pg_hba.conf' in pillar.get('postgres', {}) %}
pg_hba.conf:
file.managed:
- name: {{ postgres.pg_hba }}
@ -26,7 +26,7 @@ pg_hba.conf:
- service: postgresql
{% endif %}
{% if 'db' in pillar['postgres'] %}
{% if 'db' in pillar.get('postgres', {}) %}
postgres-app-user:
postgres_user.present:
- name: {{ pillar['postgres']['db']['user'] }}