From 10e8fa89badbbcf0f27b4f7be9578c2d7d387b5a Mon Sep 17 00:00:00 2001 From: Seth House Date: Thu, 29 May 2014 13:01:39 -0600 Subject: [PATCH] Switched to safe dictionary lookup methods Fixes #10 --- postgres/init.sls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postgres/init.sls b/postgres/init.sls index e6a2db4..17104a0 100644 --- a/postgres/init.sls +++ b/postgres/init.sls @@ -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'] }}