We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent adf7c41 commit c1667cbCopy full SHA for c1667cb
postgres/upstream.sls
@@ -1,6 +1,8 @@
1
{%- from tpldir + "/map.jinja" import postgres with context -%}
2
{%- from tpldir + "/macros.jinja" import format_kwargs with context -%}
3
4
+{% set pg_common_version = salt['pkg.version']('postgresql-common') %}
5
+
6
{%- if 'pkg_repo' in postgres -%}
7
8
{%- if postgres.use_upstream_repo == true -%}
@@ -24,13 +26,15 @@ postgresql-pkg-deps:
24
26
25
27
# Add upstream repository for your distro
28
{% if grains.os_family == 'Debian' %}
29
+ {% if salt['pkg.version_cmp'](pg_common_version, '246') <= 0 %}
30
postgresql-repo-keyring:
31
pkg.installed:
32
- sources:
33
- pgdg-keyring: {{ postgres.pkg_repo_keyring }}
34
- require_in:
35
- pkgrepo: postgresql-repo
36
{%- endif %}
37
+ {%- endif %}
38
39
postgresql-repo:
40
pkgrepo.managed:
0 commit comments