diff --git a/molecule/pdns-rec-48/molecule.yml b/molecule/pdns-rec-48/molecule.yml index a104de4..33a47b8 100644 --- a/molecule/pdns-rec-48/molecule.yml +++ b/molecule/pdns-rec-48/molecule.yml @@ -10,8 +10,8 @@ dependency: name: galaxy platforms: - - name: centos-7 - image: centos:7 + - name: oraclelinux-7 + image: oraclelinux:7 dockerfile_tpl: centos-systemd - name: oraclelinux-8 diff --git a/molecule/pdns-rec-49/molecule.yml b/molecule/pdns-rec-49/molecule.yml index 7521b00..71dc559 100644 --- a/molecule/pdns-rec-49/molecule.yml +++ b/molecule/pdns-rec-49/molecule.yml @@ -10,8 +10,8 @@ dependency: name: galaxy platforms: - - name: centos-7 - image: centos:7 + - name: oraclelinux-7 + image: oraclelinux:7 dockerfile_tpl: centos-systemd - name: oraclelinux-8 diff --git a/molecule/pdns-rec-50/molecule.yml b/molecule/pdns-rec-50/molecule.yml index 35ca9a2..2dcffd4 100644 --- a/molecule/pdns-rec-50/molecule.yml +++ b/molecule/pdns-rec-50/molecule.yml @@ -10,8 +10,8 @@ dependency: name: galaxy platforms: - - name: centos-7 - image: centos:7 + - name: oraclelinux-7 + image: oraclelinux:7 dockerfile_tpl: centos-systemd - name: oraclelinux-8 diff --git a/molecule/pdns-rec-master/molecule.yml b/molecule/pdns-rec-master/molecule.yml index de6d983..eba18cf 100644 --- a/molecule/pdns-rec-master/molecule.yml +++ b/molecule/pdns-rec-master/molecule.yml @@ -10,8 +10,8 @@ dependency: name: galaxy platforms: - - name: centos-7 - image: centos:7 + - name: oraclelinux-7 + image: oraclelinux:7 dockerfile_tpl: centos-systemd - name: oraclelinux-8 diff --git a/molecule/resources/create.yml b/molecule/resources/create.yml index 5138c42..21565af 100644 --- a/molecule/resources/create.yml +++ b/molecule/resources/create.yml @@ -60,5 +60,5 @@ privileged: "yes" volumes: # Mount the cgroups fs to allow SystemD to run into the containers - - "/sys/fs/cgroup:/sys/fs/cgroup:ro" + - "/sys/fs/cgroup:/sys/fs/cgroup:rw" with_items: "{{ molecule_platform_instances }}" diff --git a/molecule/resources/tests/repo-master/test_repo_master.py b/molecule/resources/tests/repo-master/test_repo_master.py index c2a68b2..48daa93 100644 --- a/molecule/resources/tests/repo-master/test_repo_master.py +++ b/molecule/resources/tests/repo-master/test_repo_master.py @@ -29,5 +29,5 @@ def test_pdns_repo(host): def test_pdns_version(host): cmd = host.run('/usr/sbin/pdns_recursor --version') - assert 'PowerDNS Recursor' in cmd.stderr - assert 'master' in cmd.stderr + assert 'PowerDNS Recursor' in cmd.stderr or 'PowerDNS Recursor' in cmd.stdout + assert 'master' in cmd.stderr or 'master' in cmd.stdout diff --git a/molecule/resources/vars/pdns-rec-common.yml b/molecule/resources/vars/pdns-rec-common.yml index 15770c6..ed8f03b 100644 --- a/molecule/resources/vars/pdns-rec-common.yml +++ b/molecule/resources/vars/pdns-rec-common.yml @@ -40,6 +40,3 @@ pdns_rec_config: pdns_rec_config_lua: "{{ pdns_rec_config_dir }}/rpz.lua" pdns_rec_config_lua_file_content: | rpzMaster("127.0.0.2", "rpz.test", {refresh=30}) - -pdns_rec_service_overrides: - LimitCORE: infinity diff --git a/molecule/resources/vars/pdns-rec-repo-47.yml b/molecule/resources/vars/pdns-rec-repo-47.yml index fa51036..b97b366 100644 --- a/molecule/resources/vars/pdns-rec-repo-47.yml +++ b/molecule/resources/vars/pdns-rec-repo-47.yml @@ -5,3 +5,6 @@ ## pdns_rec_install_repo: "{{ pdns_rec_powerdns_repo_47 }}" + +pdns_rec_service_overrides: + LimitCORE: infinity diff --git a/molecule/resources/vars/pdns-rec-repo-48.yml b/molecule/resources/vars/pdns-rec-repo-48.yml index 873fb94..ecf6655 100644 --- a/molecule/resources/vars/pdns-rec-repo-48.yml +++ b/molecule/resources/vars/pdns-rec-repo-48.yml @@ -5,3 +5,6 @@ ## pdns_rec_install_repo: "{{ pdns_rec_powerdns_repo_48 }}" + +pdns_rec_service_overrides: + LimitCORE: infinity diff --git a/molecule/resources/vars/pdns-rec-repo-49.yml b/molecule/resources/vars/pdns-rec-repo-49.yml index 6a09cd4..e0dc9d0 100644 --- a/molecule/resources/vars/pdns-rec-repo-49.yml +++ b/molecule/resources/vars/pdns-rec-repo-49.yml @@ -5,3 +5,6 @@ ## pdns_rec_install_repo: "{{ pdns_rec_powerdns_repo_49 }}" + +pdns_rec_service_overrides: + LimitCORE: infinity diff --git a/molecule/resources/vars/pdns-rec-repo-50.yml b/molecule/resources/vars/pdns-rec-repo-50.yml index 98b0ca6..05ebaf5 100644 --- a/molecule/resources/vars/pdns-rec-repo-50.yml +++ b/molecule/resources/vars/pdns-rec-repo-50.yml @@ -4,4 +4,7 @@ # PowerDNS Recursor 5.0.x Repository ## -pdns_rec_install_repo: "{{ pdns_rec_powerdns_repo_50 }}" \ No newline at end of file +pdns_rec_install_repo: "{{ pdns_rec_powerdns_repo_50 }}" + +pdns_rec_service_overrides: + LimitCORE: infinity diff --git a/molecule/resources/vars/pdns-rec-repo-master.yml b/molecule/resources/vars/pdns-rec-repo-master.yml index 2ef9948..241e0e9 100644 --- a/molecule/resources/vars/pdns-rec-repo-master.yml +++ b/molecule/resources/vars/pdns-rec-repo-master.yml @@ -5,3 +5,7 @@ ## pdns_rec_install_repo: "{{ pdns_rec_powerdns_repo_master }}" + +pdns_rec_service_overrides: + LimitCORE: infinity + ExecStart: /usr/sbin/pdns_recursor --daemon=no --write-pid=no --disable-syslog --log-timestamp=no --enable-old-settings diff --git a/templates/override-service.systemd.conf.j2 b/templates/override-service.systemd.conf.j2 index 93f15c8..8b51544 100644 --- a/templates/override-service.systemd.conf.j2 +++ b/templates/override-service.systemd.conf.j2 @@ -1,4 +1,7 @@ [Service] {% for k, v in pdns_rec_service_overrides.items() %} +{% if k == 'ExecStart' %}ExecStart= +{% elif k == 'ExecStartPre' %}ExecStartPre= +{% endif %} {{ k }}={{ v }} {% endfor %} diff --git a/test-requirements.txt b/test-requirements.txt index 4db7fe1..a1225fd 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,4 +4,4 @@ molecule-plugins[docker]==23.4.1 molecule-plugins[lint]==23.4.1 molecule==5.1.0 pytest-testinfra==10.1.0 -docker==7.0.0 +docker==7.1.0