Skip to content

Commit 12666c3

Browse files
teankieteankie
and
teankie
authored
fix(upstream): install keyring only in old versions
Solves #327: postgresql-common conflicts with pgdg-keyring Co-authored-by: teankie <[email protected]>
1 parent adf7c41 commit 12666c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

postgres/upstream.sls

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{%- from tpldir + "/macros.jinja" import format_kwargs with context -%}
33
44
{%- if 'pkg_repo' in postgres -%}
5+
{% set pg_common_version = salt['pkg.version']('postgresql-common') %}
56
67
{%- if postgres.use_upstream_repo == true -%}
78
@@ -24,13 +25,15 @@ postgresql-pkg-deps:
2425
2526
# Add upstream repository for your distro
2627
{% if grains.os_family == 'Debian' %}
28+
{% if salt['pkg.version_cmp'](pg_common_version, '246') <= 0 %}
2729
postgresql-repo-keyring:
2830
pkg.installed:
2931
- sources:
3032
- pgdg-keyring: {{ postgres.pkg_repo_keyring }}
3133
- require_in:
3234
- pkgrepo: postgresql-repo
3335
{%- endif %}
36+
{%- endif %}
3437
3538
postgresql-repo:
3639
pkgrepo.managed:

0 commit comments

Comments
 (0)