Adjust the init state's jinja syntax to prevent errors if there is no postgres pillar data
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{% from "postgres/map.jinja" import postgres with context %}
|
{% 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:
|
install-postgresql-repo:
|
||||||
pkgrepo.managed:
|
pkgrepo.managed:
|
||||||
- humanname: PostgreSQL Official Repository
|
- humanname: PostgreSQL Official Repository
|
||||||
@@ -15,7 +15,7 @@ install-postgresql-repo:
|
|||||||
install-postgresql:
|
install-postgresql:
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
- name: {{ postgres.pkg }}
|
- 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 %}
|
{% if postgres.create_cluster != False %}
|
||||||
create-postgresql-cluster:
|
create-postgresql-cluster:
|
||||||
|
|||||||
Reference in New Issue
Block a user