diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e84a7cf..1efa80d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,6 @@ jobs: - '2.10' - '2.11' scenario: - - pdns-42 - pdns-43 - pdns-44 - pdns-master diff --git a/README.md b/README.md index 4e8ca11..afe1be0 100644 --- a/README.md +++ b/README.md @@ -32,17 +32,17 @@ By default, the PowerDNS Authoritative Server is installed from the software rep - { role: PowerDNS.pdns, pdns_install_repo: "{{ pdns_auth_powerdns_repo_master }}" -# Install the PowerDNS Authoritative Server from the '4.1.x' official repository +# Install the PowerDNS Authoritative Server from the '4.3.x' official repository - hosts: all roles: - { role: PowerDNS.pdns, - pdns_install_repo: "{{ pdns_auth_powerdns_repo_41 }}" + pdns_install_repo: "{{ pdns_auth_powerdns_repo_43 }}" -# Install the PowerDNS Authoritative Server from the '4.2.x' official repository +# Install the PowerDNS Authoritative Server from the '4.4.x' official repository - hosts: all roles: - { role: PowerDNS.pdns, - pdns_install_repo: "{{ pdns_auth_powerdns_repo_42 }}" + pdns_install_repo: "{{ pdns_auth_powerdns_repo_44 }}" ``` The examples above, show how to install the PowerDNS Authoritative Server from the official PowerDNS repositories @@ -345,7 +345,7 @@ To test all the scenarios run To run a custom molecule command - $ tox -e py27-ansible27 -- molecule test -s pdns-42 + $ tox -e ansible210 -- molecule test -s pdns-44 ## License diff --git a/molecule/pdns-42/converge.yml b/molecule/pdns-42/converge.yml deleted file mode 100644 index d7d3bac..0000000 --- a/molecule/pdns-42/converge.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- - -- hosts: pdns - vars_files: - - ../resources/vars/pdns-common.yml - - ../resources/vars/pdns-repo-42.yml - - ../resources/vars/pdns-backends.yml - roles: - - { role: pdns-ansible } diff --git a/molecule/pdns-42/molecule.yml b/molecule/pdns-42/molecule.yml deleted file mode 100644 index c9dc469..0000000 --- a/molecule/pdns-42/molecule.yml +++ /dev/null @@ -1,88 +0,0 @@ ---- - -scenario: - name: pdns-42 - -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: debian-9 - groups: ["pdns"] - image: debian:9 - dockerfile_tpl: debian-systemd - - - name: debian-10 - groups: ["pdns"] - image: debian:10 - dockerfile_tpl: debian-systemd - - # 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-42/ - - ../backend-sqlite/ - - ../backend-mysql/ - - ../systemd-override/ - lint: flake8 diff --git a/molecule/resources/tests/repo-42/test_repo_42.py b/molecule/resources/tests/repo-42/test_repo_42.py deleted file mode 100644 index 94434d8..0000000 --- a/molecule/resources/tests/repo-42/test_repo_42.py +++ /dev/null @@ -1,44 +0,0 @@ - -debian_os = ['debian', 'ubuntu'] -rhel_os = ['redhat', 'centos'] - - -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-auth-42.list') - if host.system_info.distribution.lower() in rhel_os: - f = host.file('/etc/yum.repos.d/powerdns-auth-42.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-auth-42.list') - if host.system_info.distribution.lower() in rhel_os: - f = host.file('/etc/yum.repos.d/powerdns-auth-42.repo') - - assert f.exists - assert f.contains('auth-42') - - -def test_repo_pinning_file(host): - if host.system_info.distribution.lower() in debian_os: - f = host.file('/etc/apt/preferences.d/pdns') - assert f.exists - assert f.user == 'root' - assert f.group == 'root' - f.contains('Package: pdns-*') - f.contains('Pin: origin repo.powerdns.com') - f.contains('Pin-Priority: 600') - - -def test_pdns_version(host): - cmd = host.run('/usr/sbin/pdns_server --version') - - assert 'PowerDNS Authoritative Server' in cmd.stderr - assert '4.2' in cmd.stderr diff --git a/molecule/resources/vars/pdns-repo-42.yml b/molecule/resources/vars/pdns-repo-42.yml deleted file mode 100644 index 48a0d7d..0000000 --- a/molecule/resources/vars/pdns-repo-42.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- - -## -# PowerDNS 4.2.x Repository -## - -pdns_install_repo: "{{ pdns_auth_powerdns_repo_42 }}" diff --git a/vars/main.yml b/vars/main.yml index e8a1588..10ac8a0 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -9,33 +9,6 @@ pdns_auth_powerdns_repo_master: yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-master/debug" name: "powerdns-auth-master" -pdns_auth_powerdns_repo_40: - apt_repo_origin: "repo.powerdns.com" - apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-auth-40 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-40" - yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-40/debug" - name: "powerdns-auth-40" - -pdns_auth_powerdns_repo_41: - apt_repo_origin: "repo.powerdns.com" - apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-auth-41 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-41" - yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-41/debug" - name: "powerdns-auth-41" - -pdns_auth_powerdns_repo_42: - apt_repo_origin: "repo.powerdns.com" - apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-auth-42 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-42" - yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-42/debug" - name: "powerdns-auth-42" - pdns_auth_powerdns_repo_43: apt_repo_origin: "repo.powerdns.com" apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-auth-43 main" @@ -57,6 +30,5 @@ pdns_auth_powerdns_repo_44: default_pdns_service_overrides: >- {{ { 'User' : pdns_user , 'Group' : pdns_group - } if _pdns_running_version is version('4.3', operator='ge') - else {} + } }}