Skip to content

Commit c1667cb

Browse files
committed
1 parent adf7c41 commit c1667cb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

postgres/upstream.sls

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{%- from tpldir + "/map.jinja" import postgres with context -%}
22
{%- from tpldir + "/macros.jinja" import format_kwargs with context -%}
33
4+
{% set pg_common_version = salt['pkg.version']('postgresql-common') %}
5+
46
{%- if 'pkg_repo' in postgres -%}
57
68
{%- if postgres.use_upstream_repo == true -%}
@@ -24,13 +26,15 @@ postgresql-pkg-deps:
2426
2527
# Add upstream repository for your distro
2628
{% if grains.os_family == 'Debian' %}
29+
{% if salt['pkg.version_cmp'](pg_common_version, '246') <= 0 %}
2730
postgresql-repo-keyring:
2831
pkg.installed:
2932
- sources:
3033
- pgdg-keyring: {{ postgres.pkg_repo_keyring }}
3134
- require_in:
3235
- pkgrepo: postgresql-repo
3336
{%- endif %}
37+
{%- endif %}
3438
3539
postgresql-repo:
3640
pkgrepo.managed:

0 commit comments

Comments
 (0)