Skip to content

Commit

Permalink
support dnsdist 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
franklouwers committed Dec 21, 2024
1 parent 8a6bb0f commit 7913329
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
32 changes: 32 additions & 0 deletions molecule/resources/tests/repo-19/test_repo_19.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

debian_os = ['debian', 'ubuntu']
rhel_os = ['redhat', 'centos', 'ol', 'rocky', 'almalinux']


def test_repo_file(host):
f = None
if host.system_info.distribution.lower() in debian_os:
f = host.file('/etc/apt/sources.list.d/powerdns-dnsdist-19.list')
if host.system_info.distribution.lower() in rhel_os:
f = host.file('/etc/yum.repos.d/powerdns-dnsdist-19.repo')

assert f.exists
assert f.user == 'root'
assert f.group == 'root'


def test_pdns_repo(host):
f = None
if host.system_info.distribution.lower() in debian_os:
f = host.file('/etc/apt/sources.list.d/powerdns-dnsdist-19.list')
if host.system_info.distribution.lower() in rhel_os:
f = host.file('/etc/yum.repos.d/powerdns-dnsdist-19.repo')

assert f.exists
assert f.contains('dnsdist-19')


def test_pdns_version(host):
cmd = host.run('/usr/bin/dnsdist --version')

assert 'dnsdist 1.9' in cmd.stdout
7 changes: 7 additions & 0 deletions molecule/resources/vars/dnsdist-repo-19.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---

##
# Dnsdist 1.9.x Repository
##

dnsdist_install_repo: "{{ dnsdist_powerdns_repo_19 }}"
9 changes: 9 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,12 @@ dnsdist_powerdns_repo_18:
yum_repo_baseurl: http://repo.powerdns.com/centos/$basearch/$releasever/dnsdist-18
yum_debug_symbols_repo_baseurl: http://repo.powerdns.com/centos/$basearch/$releasever/dnsdist-18/debug
name: powerdns-dnsdist-18

dnsdist_powerdns_repo_19:
apt_repo_origin: repo.powerdns.com
apt_repo: deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-dnsdist-19 main
gpg_key: http://repo.powerdns.com/FD380FBB-pub.asc
gpg_key_id: 9FAAA5577E8FCF62093D036C1B0C6205FD380FBB
yum_repo_baseurl: http://repo.powerdns.com/centos/$basearch/$releasever/dnsdist-19
yum_debug_symbols_repo_baseurl: http://repo.powerdns.com/centos/$basearch/$releasever/dnsdist-19/debug
name: powerdns-dnsdist-19

0 comments on commit 7913329

Please sign in to comment.