fix(upstream): install keyring only in old versions

Solves #327: postgresql-common conflicts with pgdg-keyring

Co-authored-by: teankie <remcomank@eleven.nl>
This commit is contained in:
teankie 2023-02-09 11:17:56 +01:00 committed by GitHub
parent adf7c415b8
commit 12666c3b13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,7 @@
{%- from tpldir + "/macros.jinja" import format_kwargs with context -%}
{%- if 'pkg_repo' in postgres -%}
{% set pg_common_version = salt['pkg.version']('postgresql-common') %}
{%- if postgres.use_upstream_repo == true -%}
@ -24,6 +25,7 @@ postgresql-pkg-deps:
# Add upstream repository for your distro
{% if grains.os_family == 'Debian' %}
{% if salt['pkg.version_cmp'](pg_common_version, '246') <= 0 %}
postgresql-repo-keyring:
pkg.installed:
- sources:
@ -31,6 +33,7 @@ postgresql-repo-keyring:
- require_in:
- pkgrepo: postgresql-repo
{%- endif %}
{%- endif %}
postgresql-repo:
pkgrepo.managed: