From 2bd55a5a1671409c39d76dfccab0249b79e60698 Mon Sep 17 00:00:00 2001 From: Seth House Date: Fri, 16 May 2014 10:59:19 -0600 Subject: [PATCH] Wrap app db creation in an if-statement to check for Pillar values --- postgres/init.sls | 2 ++ 1 file changed, 2 insertions(+) diff --git a/postgres/init.sls b/postgres/init.sls index 0329fb7..d4872c7 100644 --- a/postgres/init.sls +++ b/postgres/init.sls @@ -26,6 +26,7 @@ pg_hba.conf: - pkg: {{ postgres.pkg }} {% endif %} +{% if 'db' in pillar['postgres'] %} postgres-app-user: postgres_user.present: - name: {{ pillar['postgres']['db']['user'] }} @@ -46,3 +47,4 @@ postgres-app-db: - runas: postgres - require: - postgres_user: postgres-app-user +{% endif %}