Skip to content

Commit

Permalink
Merge pull request #209 from romeroalx/test-commit-alma-rocky
Browse files Browse the repository at this point in the history
Add support and tests for Rocky and AlmaLinux. Supersedes #185
  • Loading branch information
npmdnl authored Jan 16, 2024
2 parents 75db908 + c0799b2 commit 127971a
Show file tree
Hide file tree
Showing 14 changed files with 82 additions and 12 deletions.
10 changes: 10 additions & 0 deletions molecule/pdns-46/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ platforms:
image: oraclelinux:8
dockerfile_tpl: centos-systemd

- name: rockylinux-8
groups: ["pdns"]
image: rockylinux:8
dockerfile_tpl: centos-systemd

- name: almalinux-8
groups: ["pdns"]
image: almalinux:8
dockerfile_tpl: centos-systemd

- name: ubuntu-2004
groups: ["pdns"]
image: ubuntu:20.04
Expand Down
20 changes: 20 additions & 0 deletions molecule/pdns-47/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,26 @@ platforms:
image: centos:7
dockerfile_tpl: centos-systemd

- name: rockylinux-8
groups: ["pdns"]
image: rockylinux:8
dockerfile_tpl: centos-systemd

- name: almalinux-8
groups: ["pdns"]
image: almalinux:8
dockerfile_tpl: centos-systemd

- name: rockylinux-9
groups: ["pdns"]
image: rockylinux:9.0
dockerfile_tpl: centos-systemd

- name: almalinux-9
groups: ["pdns"]
image: almalinux:9
dockerfile_tpl: centos-systemd

- name: oraclelinux-9
groups: ["pdns"]
image: oraclelinux:9
Expand Down
20 changes: 20 additions & 0 deletions molecule/pdns-48/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,26 @@ platforms:
image: centos:7
dockerfile_tpl: centos-systemd

- name: rockylinux-8
groups: ["pdns"]
image: rockylinux:8
dockerfile_tpl: centos-systemd

- name: almalinux-8
groups: ["pdns"]
image: almalinux:8
dockerfile_tpl: centos-systemd

- name: rockylinux-9
groups: ["pdns"]
image: rockylinux:9.0
dockerfile_tpl: centos-systemd

- name: almalinux-9
groups: ["pdns"]
image: almalinux:9
dockerfile_tpl: centos-systemd

- name: oraclelinux-9
groups: ["pdns"]
image: oraclelinux:9
Expand Down
20 changes: 20 additions & 0 deletions molecule/pdns-master/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,26 @@ platforms:
image: centos:7
dockerfile_tpl: centos-systemd

- name: rockylinux-8
groups: ["pdns"]
image: rockylinux:8
dockerfile_tpl: centos-systemd

- name: almalinux-8
groups: ["pdns"]
image: almalinux:8
dockerfile_tpl: centos-systemd

- name: rockylinux-9
groups: ["pdns"]
image: rockylinux:9.0
dockerfile_tpl: centos-systemd

- name: almalinux-9
groups: ["pdns"]
image: almalinux:9
dockerfile_tpl: centos-systemd

- name: oraclelinux-9
groups: ["pdns"]
image: oraclelinux:9
Expand Down
4 changes: 2 additions & 2 deletions molecule/resources/Dockerfile.centos-systemd.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM {{ item.image }}
ENV container docker

# Configure systemd to run into the container (see https://hub.docker.com/_/centos/)
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
RUN (cd /lib/systemd/system/sysinit.target.wants/ && for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
Expand All @@ -22,6 +22,6 @@ VOLUME [ "/sys/fs/cgroup" ]

CMD ["/usr/sbin/init"]

RUN if [ $(command -v dnf) ] && [ $(rpm -E %{rhel}) -eq 8 ]; then dnf makecache && dnf --assumeyes install python3 python3-devel python*-dnf bash iproute && dnf clean all; \
RUN if [ $(command -v dnf) ] && [ $(rpm -E %{rhel}) -eq 8 ] || [ $(rpm -E %{rhel}) -eq 9 ]; then dnf makecache && dnf --assumeyes install python3 python3-devel python*-dnf bash iproute && dnf clean all; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash iproute && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum update -y && yum install -y python sudo yum-plugin-ovl net-tools bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; fi
2 changes: 1 addition & 1 deletion molecule/resources/tests/all/test_common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

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


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

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


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

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


Expand Down
2 changes: 1 addition & 1 deletion molecule/resources/tests/pdns-48/test_repo_48.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

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


def test_repo_file(host):
Expand Down
2 changes: 1 addition & 1 deletion molecule/resources/tests/repo-45/test_repo_45.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

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


def test_repo_file(host):
Expand Down
2 changes: 1 addition & 1 deletion molecule/resources/tests/repo-46/test_repo_46.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

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


def test_repo_file(host):
Expand Down
2 changes: 1 addition & 1 deletion molecule/resources/tests/repo-47/test_repo_47.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

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


def test_repo_file(host):
Expand Down
2 changes: 1 addition & 1 deletion molecule/resources/tests/repo-master/test_repo_master.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

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


def test_repo_file(host):
Expand Down
4 changes: 2 additions & 2 deletions tasks/repo-RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
yum:
name: epel-release
state: present
when: ansible_distribution in [ 'CentOS' ]
when: ansible_distribution in [ 'CentOS', 'Rocky', 'AlmaLinux' ]

- name: Install epel-release on RHEL
package:
Expand All @@ -29,7 +29,7 @@
name: yum-plugin-priorities
state: present
when:
- ansible_distribution in [ 'CentOS' ]
- ansible_distribution in [ 'CentOS', 'Rocky', 'AlmaLinux' ]
- ansible_distribution_major_version | int < 8

- name: Add the PowerDNS YUM Repository
Expand Down

0 comments on commit 127971a

Please sign in to comment.