moved upstream repo to an include, checked for Ubuntu before attempting to add it
This commit is contained in:
@@ -1,15 +1,8 @@
|
|||||||
{% from "postgres/map.jinja" import postgres with context %}
|
{% from "postgres/map.jinja" import postgres with context %}
|
||||||
|
|
||||||
{% if salt['pillar.get']('postgres:use_upstream_repo') %}
|
{% if salt['pillar.get']('postgres:use_upstream_repo') %}
|
||||||
install-postgresql-repo:
|
include:
|
||||||
pkgrepo.managed:
|
- postgres.upstream
|
||||||
- humanname: PostgreSQL Official Repository
|
|
||||||
- name: {{ postgres.pkg_repo }}
|
|
||||||
- keyid: B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
|
||||||
- keyserver: keyserver.ubuntu.com
|
|
||||||
- file: {{ postgres.pkg_repo_file }}
|
|
||||||
- require_in:
|
|
||||||
- install-postgresql-client
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
install-postgresql-client:
|
install-postgresql-client:
|
||||||
|
|||||||
@@ -1,15 +1,8 @@
|
|||||||
{% from "postgres/map.jinja" import postgres with context %}
|
{% from "postgres/map.jinja" import postgres with context %}
|
||||||
|
|
||||||
{% if salt['pillar.get']('postgres:use_upstream_repo') %}
|
{% if salt['pillar.get']('postgres:use_upstream_repo') %}
|
||||||
install-postgresql-repo:
|
include:
|
||||||
pkgrepo.managed:
|
- postgres.upstream
|
||||||
- humanname: PostgreSQL Official Repository
|
|
||||||
- name: {{ postgres.pkg_repo }}
|
|
||||||
- keyid: B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
|
||||||
- keyserver: keyserver.ubuntu.com
|
|
||||||
- file: {{ postgres.pkg_repo_file }}
|
|
||||||
- require_in:
|
|
||||||
- install-postgresql
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
install-postgresql:
|
install-postgresql:
|
||||||
|
|||||||
11
postgres/upstream.sls
Normal file
11
postgres/upstream.sls
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{% from "postgres/map.jinja" import postgres with context %}
|
||||||
|
|
||||||
|
{% if grains['os'] == 'Ubuntu' %} # Other distro support should be added here
|
||||||
|
install-postgresql-repo:
|
||||||
|
pkgrepo.managed:
|
||||||
|
- humanname: PostgreSQL Official Repository
|
||||||
|
- name: {{ postgres.pkg_repo }}
|
||||||
|
- keyid: B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||||
|
- keyserver: keyserver.ubuntu.com
|
||||||
|
- file: {{ postgres.pkg_repo_file }}
|
||||||
|
{% endif %}
|
||||||
Reference in New Issue
Block a user