From 9a21a59b589ee8a4a31d328119865cf0b098ab56 Mon Sep 17 00:00:00 2001 From: Rico Moorman Date: Thu, 26 Feb 2015 22:58:54 +0100 Subject: [PATCH] Adjust the init state's jinja syntax to prevent errors if there is no postgres pillar data --- postgres/init.sls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postgres/init.sls b/postgres/init.sls index e94ba86..8145e1f 100644 --- a/postgres/init.sls +++ b/postgres/init.sls @@ -1,6 +1,6 @@ {% from "postgres/map.jinja" import postgres with context %} -{% if 'use_upstream_repo' in pillar.get('postgres') %} +{% if salt['pillar.get']('postgres:use_upstream_repo') %} install-postgresql-repo: pkgrepo.managed: - humanname: PostgreSQL Official Repository @@ -15,7 +15,7 @@ install-postgresql-repo: install-postgresql: pkg.installed: - name: {{ postgres.pkg }} - - refresh: {{ 'use_upstream_repo' in pillar.get('postgres') }} + - refresh: {{ salt['pillar.get']('postgres:use_upstream_repo', False) }} {% if postgres.create_cluster != False %} create-postgresql-cluster: