From 00ae831779cd4decc8b67d0ea72a16238992d08c Mon Sep 17 00:00:00 2001 From: Drew Decker Date: Thu, 12 Aug 2021 01:50:44 -0500 Subject: [PATCH 1/5] Added pdns_auth 4.5 --- vars/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vars/main.yml b/vars/main.yml index 10ac8a0..53b4218 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -27,6 +27,15 @@ pdns_auth_powerdns_repo_44: yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-44/debug" name: "powerdns-auth-44" +pdns_auth_powerdns_repo_45: + apt_repo_origin: "repo.powerdns.com" + apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-auth-45 main" + gpg_key: "http://repo.powerdns.com/FD380FBB-pub.asc" + gpg_key_id: "9FAAA5577E8FCF62093D036C1B0C6205FD380FBB" + yum_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-45" + yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-45/debug" + name: "powerdns-auth-45" + default_pdns_service_overrides: >- {{ { 'User' : pdns_user , 'Group' : pdns_group From 14db93aa90385e2357541cbfaab471a7d05ac6a0 Mon Sep 17 00:00:00 2001 From: Drew Decker Date: Thu, 12 Aug 2021 02:44:51 -0500 Subject: [PATCH 2/5] Added molecule tests for pdns-auth 4.5.x --- molecule/pdns-45/converge.yml | 9 ++ molecule/pdns-45/molecule.yml | 104 +++++++++++++++++++++++ molecule/resources/vars/pdns-repo-45.yml | 7 ++ 3 files changed, 120 insertions(+) create mode 100644 molecule/pdns-45/converge.yml create mode 100644 molecule/pdns-45/molecule.yml create mode 100644 molecule/resources/vars/pdns-repo-45.yml diff --git a/molecule/pdns-45/converge.yml b/molecule/pdns-45/converge.yml new file mode 100644 index 0000000..12c0306 --- /dev/null +++ b/molecule/pdns-45/converge.yml @@ -0,0 +1,9 @@ +--- + +- hosts: pdns + vars_files: + - ../resources/vars/pdns-common.yml + - ../resources/vars/pdns-repo-45.yml + - ../resources/vars/pdns-backends.yml + roles: + - { role: pdns-ansible } diff --git a/molecule/pdns-45/molecule.yml b/molecule/pdns-45/molecule.yml new file mode 100644 index 0000000..d568dbc --- /dev/null +++ b/molecule/pdns-45/molecule.yml @@ -0,0 +1,104 @@ +--- + +scenario: + name: pdns-45 + +driver: + name: docker + +dependency: + name: galaxy + +platforms: + - name: centos-7 + groups: ["pdns"] + image: centos:7 + dockerfile_tpl: centos-systemd + + - name: centos-8 + groups: ["pdns"] + image: centos:8 + dockerfile_tpl: centos-systemd + + - name: ubuntu-1804 + groups: ["pdns"] + image: ubuntu:18.04 + dockerfile_tpl: debian-systemd + + - name: ubuntu-2004 + groups: ["pdns"] + image: ubuntu:20.04 + tmpfs: + - /run + - /tmp + dockerfile_tpl: debian-systemd + + - name: debian-9 + groups: ["pdns"] + image: debian:9 + dockerfile_tpl: debian-systemd + + - 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 } + + # In order to run the tests we need + # a MySQL container to be up & running + - name: mysql + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: pdns + # Declaring the container as service, + # will link it to the others Platforms containers + # on creation. + is_service: yes + +provisioner: + name: ansible + options: + diff: True + v: True + config_options: + defaults: + gathering: smart + fact_caching: jsonfile + fact_caching_connection: .ansible_cache + fact_caching_timeout: 7200 + ssh_connection: + pipelining: true + inventory: + links: + host_vars: ../resources/host_vars/ + playbooks: + create: ../resources/create.yml + destroy: ../resources/destroy.yml + prepare: ../resources/prepare.yml + # "systemctl used in place of systemd module" "ANSIBLE0006" + # "Tasks that run when changed should likely be handlers" "ANSIBLE0016" + # "Shells that use pipes should set the pipefail option" "306" + lint: ansible-lint -x ANSIBLE0006 ANSIBLE0016 306 + +lint: yamllint defaults tasks meta vars + +verifier: + name: testinfra + options: + hosts: "pdns" + vvv: True + directory: ../resources/tests/all + additional_files_or_dirs: + # path relative to 'directory' + - ../repo-45/ + - ../backend-sqlite/ + - ../backend-mysql/ + - ../systemd-override/ + lint: flake8 diff --git a/molecule/resources/vars/pdns-repo-45.yml b/molecule/resources/vars/pdns-repo-45.yml new file mode 100644 index 0000000..ef6aa9e --- /dev/null +++ b/molecule/resources/vars/pdns-repo-45.yml @@ -0,0 +1,7 @@ +--- + +## +# PowerDNS 4.5.x Repository +## + +pdns_install_repo: "{{ pdns_auth_powerdns_repo_45 }}" From abaaa8cd77b1430c54d5c89aca07fb42d79028cc Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Mon, 6 Sep 2021 10:17:27 +0200 Subject: [PATCH 3/5] Add 4.5 repo to the tests --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1efa80d..6848b43 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,6 +16,7 @@ jobs: scenario: - pdns-43 - pdns-44 + - pdns-45 - pdns-master - pdns-os-repos - systemd-no-overrides From 6b67e7ad47f4c985edb63be9e149dbe3a5632a8a Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Mon, 6 Sep 2021 10:34:13 +0200 Subject: [PATCH 4/5] No 4.5 on Debian 9 --- molecule/pdns-45/molecule.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/molecule/pdns-45/molecule.yml b/molecule/pdns-45/molecule.yml index d568dbc..6d400de 100644 --- a/molecule/pdns-45/molecule.yml +++ b/molecule/pdns-45/molecule.yml @@ -33,11 +33,6 @@ platforms: - /tmp dockerfile_tpl: debian-systemd - - name: debian-9 - groups: ["pdns"] - image: debian:9 - dockerfile_tpl: debian-systemd - - name: debian-10 groups: ["pdns"] image: debian:10 From 9b563000e4ad2aaecba6ef4a05e552c64a6de884 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Mon, 6 Sep 2021 10:37:30 +0200 Subject: [PATCH 5/5] No 4.5 on Ubuntu 18.04 --- molecule/pdns-45/molecule.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/molecule/pdns-45/molecule.yml b/molecule/pdns-45/molecule.yml index 6d400de..59fb415 100644 --- a/molecule/pdns-45/molecule.yml +++ b/molecule/pdns-45/molecule.yml @@ -20,11 +20,6 @@ platforms: image: centos:8 dockerfile_tpl: centos-systemd - - name: ubuntu-1804 - groups: ["pdns"] - image: ubuntu:18.04 - dockerfile_tpl: debian-systemd - - name: ubuntu-2004 groups: ["pdns"] image: ubuntu:20.04