From 1550deb3f8630edb078e6f3a2822227ae8c21b07 Mon Sep 17 00:00:00 2001 From: romeroalx Date: Fri, 12 Apr 2024 15:09:17 +0200 Subject: [PATCH 1/3] ci: fix pdns-os-repos tests --- molecule/resources/Dockerfile.debian-systemd.j2 | 2 +- molecule/resources/host_vars/debian-10.yml | 3 +++ molecule/resources/host_vars/debian-11.yml | 5 +++++ molecule/resources/host_vars/ubuntu-2004.yml | 4 ++++ molecule/resources/vars/pdns-os-repos.yml | 11 +++++++---- vars/Debian.yml | 1 - 6 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 molecule/resources/host_vars/debian-11.yml diff --git a/molecule/resources/Dockerfile.debian-systemd.j2 b/molecule/resources/Dockerfile.debian-systemd.j2 index cf847ec..c608141 100644 --- a/molecule/resources/Dockerfile.debian-systemd.j2 +++ b/molecule/resources/Dockerfile.debian-systemd.j2 @@ -22,4 +22,4 @@ VOLUME [ "/sys/fs/cgroup" ] CMD ["/sbin/init"] -RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python python3 sudo bash net-tools ca-certificates && apt-get clean; fi +RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python3 sudo bash net-tools ca-certificates && apt-get clean; fi diff --git a/molecule/resources/host_vars/debian-10.yml b/molecule/resources/host_vars/debian-10.yml index b178860..dcf4a9a 100644 --- a/molecule/resources/host_vars/debian-10.yml +++ b/molecule/resources/host_vars/debian-10.yml @@ -2,3 +2,6 @@ ansible_python_interpreter: "/usr/bin/python3" +# pdns-os-repos: debian-10 installs auth 4.1.6 +_pdns_config_legacy: + master: true diff --git a/molecule/resources/host_vars/debian-11.yml b/molecule/resources/host_vars/debian-11.yml new file mode 100644 index 0000000..590c302 --- /dev/null +++ b/molecule/resources/host_vars/debian-11.yml @@ -0,0 +1,5 @@ +--- + +# pdns-os-repos: debian-11 installs auth 4.4.1 +_pdns_config_legacy: + master: true diff --git a/molecule/resources/host_vars/ubuntu-2004.yml b/molecule/resources/host_vars/ubuntu-2004.yml index 17c2edf..7f08575 100644 --- a/molecule/resources/host_vars/ubuntu-2004.yml +++ b/molecule/resources/host_vars/ubuntu-2004.yml @@ -1,3 +1,7 @@ --- ansible_python_interpreter: "/usr/bin/python3" + +# pdns-os-repos: ubuntu-20.04 installs auth 4.4.1 +_pdns_config_legacy: + master: true diff --git a/molecule/resources/vars/pdns-os-repos.yml b/molecule/resources/vars/pdns-os-repos.yml index c25c85a..f150fd8 100644 --- a/molecule/resources/vars/pdns-os-repos.yml +++ b/molecule/resources/vars/pdns-os-repos.yml @@ -4,10 +4,7 @@ # PowerDNS Configuration ## -pdns_config: - - # Turns on master operations - primary: true +_pdns_config_base: # Listen Address local-address: "127.0.0.1" @@ -22,5 +19,11 @@ pdns_config: webserver-address: "0.0.0.0" webserver-port: "8001" +# Turns on master operations +_pdns_config_primary: + primary: true + +pdns_config: "{{ _pdns_config_base | combine(_pdns_config_legacy | default(_pdns_config_primary), recursive=True) }}" + pdns_service_overrides: LimitCORE: infinity diff --git a/vars/Debian.yml b/vars/Debian.yml index 3cf0821..af1038c 100644 --- a/vars/Debian.yml +++ b/vars/Debian.yml @@ -9,7 +9,6 @@ default_pdns_debug_symbols_package_name: "pdns-server-dbg" # Packages needed to install MySQL pdns_mysql_packages: - default-mysql-client - - python-mysqldb - python3-mysqldb # List of PowerDNS Authoritative Server Backends packages on Debian From 689acbc1bafd1ef4a6846800e8a0774080b9c03a Mon Sep 17 00:00:00 2001 From: romeroalx Date: Fri, 12 Apr 2024 15:13:31 +0200 Subject: [PATCH 2/3] bump-up version for ci actions --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c3aad4c..677b760 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,9 +25,9 @@ jobs: fail-fast: false steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" - name: Install dependencies From 14cea058a93ccf384a5869496f82cb1270e5f0fe Mon Sep 17 00:00:00 2001 From: romeroalx Date: Fri, 12 Apr 2024 15:30:11 +0200 Subject: [PATCH 3/3] pdns-os-repos test: add ubuntu-22 and debian-10 --- molecule/pdns-os-repos/molecule.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/molecule/pdns-os-repos/molecule.yml b/molecule/pdns-os-repos/molecule.yml index 4a829c5..babf003 100644 --- a/molecule/pdns-os-repos/molecule.yml +++ b/molecule/pdns-os-repos/molecule.yml @@ -10,6 +10,19 @@ dependency: name: galaxy platforms: + - name: debian-10 + groups: ["pdns"] + image: debian:10 + privileged: True + volume_mounts: + - "/sys/fs/cgroup:/sys/fs/cgroup:rw" + tmpfs: + - /run + - /run/lock + - /tmp + dockerfile_tpl: debian-systemd + environment: { container: docker } + - name: debian-11 groups: ["pdns"] image: debian:11 @@ -36,6 +49,14 @@ platforms: - /tmp dockerfile_tpl: debian-systemd + - name: ubuntu-2204 + groups: ["pdns"] + image: ubuntu:22.04 + tmpfs: + - /run + - /tmp + dockerfile_tpl: debian-systemd + # In order to run the tests we need # a MySQL container to be up & running - name: mysql