Skip to content

Commit

Permalink
fix(repo): Repo settings have been updated to handle key handling cha…
Browse files Browse the repository at this point in the history
…nge.
  • Loading branch information
Wayne Gemmell committed Feb 7, 2024
1 parent 45345f9 commit 76b0748
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 12 deletions.
2 changes: 1 addition & 1 deletion powerdns/osfamilymap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 30 additions & 5 deletions powerdns/osfingermap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand Down
20 changes: 14 additions & 6 deletions powerdns/repo.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

0 comments on commit 76b0748

Please sign in to comment.