Adjust the init state's jinja syntax to prevent errors if there is no postgres pillar data

This commit is contained in:
Rico Moorman 2015-02-26 22:58:54 +01:00
parent 8ed841f8e5
commit 9a21a59b58

View file

@ -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: