Add option to use upstream repo on Debian

This commit is contained in:
Alan Pearce
2015-02-01 14:40:45 +00:00
parent 07a3073fab
commit b317cebf18
3 changed files with 18 additions and 1 deletions

View File

@@ -1,8 +1,21 @@
{% from "postgres/map.jinja" import postgres with context %}
{% if 'use_upstream_repo' in pillar.get('postgres') %}
install-postgresql-repo:
pkgrepo.managed:
- humanname: PostgreSQL Official Repository
- name: {{ postgres.pkg_repo }}
- keyid: B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
- keyserver: keyserver.ubuntu.com
- file: {{ postgres.pkg_repo_file }}
- require_in:
- install-postgresql
{% endif %}
install-postgresql:
pkg.installed:
- name: {{ postgres.pkg }}
- refresh: {{ 'use_upstream_repo' in pillar.get('postgres') }}
{% if postgres.create_cluster != False %}
create-postgresql-cluster: