From 3227e9f3a5737c899f2f317292cd30355ce62190 Mon Sep 17 00:00:00 2001 From: Wayne Gemmell Date: Wed, 21 Sep 2022 09:59:44 +0200 Subject: [PATCH] fix(repo): Repository settings have been updated to accomodate deb key handling change. --- powerdns/osfamilymap.yaml | 2 +- powerdns/osfingermap.yaml | 35 ++++++++++++++++++++++++++++++----- powerdns/repo.sls | 20 ++++++++++++++------ 3 files changed, 45 insertions(+), 12 deletions(-) diff --git a/powerdns/osfamilymap.yaml b/powerdns/osfamilymap.yaml index be4df7c..7583005 100644 --- a/powerdns/osfamilymap.yaml +++ b/powerdns/osfamilymap.yaml @@ -26,11 +26,11 @@ Debian: backend_remote_pkg: pdns-backend-remote backend_sqlite3_pkg: pdns-backend-sqlite3 backend_sqlite3_pkg_sql: /usr/share/doc/pdns-backend-sqlite3/schema.sqlite3.sql + repo_stable_key_url: https://repo.powerdns.com/FD380FBB-pub.asc config: config-dir: /etc/powerdns setgid: pdns setuid: pdns - launch: '' RedHat: pkg: pdns diff --git a/powerdns/osfingermap.yaml b/powerdns/osfingermap.yaml index 090e844..ab5f02d 100644 --- a/powerdns/osfingermap.yaml +++ b/powerdns/osfingermap.yaml @@ -11,13 +11,38 @@ # osfingermap: {} --- # os: Debian -Debian-10: {} -Debian-9: {} -Debian-8: {} +Debian-12: + repo_aptkey: False + repo_signedby: signed-by=/etc/apt/keyrings/powerdns.gpg + +Debian-11: + repo_aptkey: True + repo_signedby: "" + +Debian-10: + repo_aptkey: True + repo_signedby: "" + +Debian-9: + repo_aptkey: True + repo_signedby: "" + +Debian-8: + repo_aptkey: True + repo_signedby: "" # os: Ubuntu -Ubuntu-18.04: {} -Ubuntu-16.04: {} +Ubuntu-22.04: + repo_aptkey: False + repo_signedby: signed-by=/etc/apt/keyrings/powerdns.gpg + +Ubuntu-18.04: + repo_aptkey: True + repo_signedby: "" + +Ubuntu-16.04: + repo_aptkey: True + repo_signedby: "" # os: Fedora Fedora-31: {} diff --git a/powerdns/repo.sls b/powerdns/repo.sls index 17ba24d..2f6a3db 100644 --- a/powerdns/repo.sls +++ b/powerdns/repo.sls @@ -4,13 +4,21 @@ powerdns_server_repo: pkgrepo.managed: - humanname: PowerDNS {% if salt['grains.get']('os_family') == 'Debian' %} - {% set repo = 'deb [arch=amd64] https://repo.powerdns.com/{0} {1}-auth-{2} main'.format( + - key_url: {{ powerdns.repo_stable_key_url }} + {% if (salt['grains.get']('osfullname') == "Ubuntu" and salt['grains.get']('osmajorrelease') < 22) + or (salt['grains.get']('osfullname') == "Debian" and salt['grains.get']('osmajorrelease') < 12) %} + - keyid: {{ powerdns.repo.keyid }} + - keyserver: keyserver.ubuntu.com + {% endif %} + - aptkey: {{ powerdns.repo_aptkey }} + {% set repo = 'deb [arch=amd64 {3}] https://repo.powerdns.com/{0} {1}-auth-{2} main'.format( salt['grains.get']('os').lower(), salt['grains.get']('oscodename'), - powerdns.repo.release - ) %} + powerdns.repo.release, + powerdns.repo_signedby + ) %} - name: {{ repo }} - file: /etc/apt/sources.list.d/powerdns.list - - keyid: {{ powerdns.repo.keyid }} - - keyserver: keyserver.ubuntu.com - {% endif %} + - clean_file : True + + {% endif %}