From 918c4add346f6ab8d70ac8b1f91d0bd21493feae Mon Sep 17 00:00:00 2001 From: Daniele Petiti Date: Fri, 12 Jan 2024 18:03:26 +0100 Subject: [PATCH 1/2] Added Debian buster and bookworm in CI - updated galaxy meta info --- meta/main.yml | 4 ++-- molecule/pdns-rec-48/molecule.yml | 8 ++++++++ molecule/pdns-rec-49/molecule.yml | 8 ++++++++ molecule/pdns-rec-50/molecule.yml | 8 ++++++++ molecule/pdns-rec-master/molecule.yml | 8 ++++++++ 5 files changed, 34 insertions(+), 2 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index e26dcac..ecd2d9c 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -15,11 +15,11 @@ galaxy_info: - 8 - name: Debian versions: - - buster - bullseye + - buster + - bookworm - name: Ubuntu versions: - - bionic - focal - jammy - name: FreeBSD diff --git a/molecule/pdns-rec-48/molecule.yml b/molecule/pdns-rec-48/molecule.yml index 14b71ae..d69525d 100644 --- a/molecule/pdns-rec-48/molecule.yml +++ b/molecule/pdns-rec-48/molecule.yml @@ -30,6 +30,14 @@ platforms: image: debian:10 dockerfile_tpl: debian-systemd + - name: debian-11 + image: debian:11 + dockerfile_tpl: debian-python3 + + - name: debian-12 + image: debian:12 + dockerfile_tpl: debian-python3 + provisioner: name: ansible options: diff --git a/molecule/pdns-rec-49/molecule.yml b/molecule/pdns-rec-49/molecule.yml index 40ee3f6..31190af 100644 --- a/molecule/pdns-rec-49/molecule.yml +++ b/molecule/pdns-rec-49/molecule.yml @@ -30,6 +30,14 @@ platforms: image: debian:10 dockerfile_tpl: debian-systemd + - name: debian-11 + image: debian:11 + dockerfile_tpl: debian-python3 + + - name: debian-12 + image: debian:12 + dockerfile_tpl: debian-python3 + provisioner: name: ansible options: diff --git a/molecule/pdns-rec-50/molecule.yml b/molecule/pdns-rec-50/molecule.yml index 54e119b..7cbee0a 100644 --- a/molecule/pdns-rec-50/molecule.yml +++ b/molecule/pdns-rec-50/molecule.yml @@ -30,6 +30,14 @@ platforms: image: debian:10 dockerfile_tpl: debian-systemd + - name: debian-11 + image: debian:11 + dockerfile_tpl: debian-python3 + + - name: debian-12 + image: debian:12 + dockerfile_tpl: debian-python3 + provisioner: name: ansible options: diff --git a/molecule/pdns-rec-master/molecule.yml b/molecule/pdns-rec-master/molecule.yml index 18f59b4..0bbf29d 100644 --- a/molecule/pdns-rec-master/molecule.yml +++ b/molecule/pdns-rec-master/molecule.yml @@ -30,6 +30,14 @@ platforms: image: debian:10 dockerfile_tpl: debian-systemd + - name: debian-11 + image: debian:11 + dockerfile_tpl: debian-python3 + + - name: debian-12 + image: debian:12 + dockerfile_tpl: debian-python3 + provisioner: name: ansible options: From 37b0192cdbe4ab5d7bbe4404558fdacfbdd77924 Mon Sep 17 00:00:00 2001 From: Daniele Petiti Date: Fri, 12 Jan 2024 18:19:05 +0100 Subject: [PATCH 2/2] forgotten files --- .../resources/Dockerfile.debian-python3.j2 | 25 +++++++++++++++++++ molecule/resources/host_vars/debian-11.yml | 3 +++ molecule/resources/host_vars/debian-12.yml | 3 +++ 3 files changed, 31 insertions(+) create mode 100644 molecule/resources/Dockerfile.debian-python3.j2 create mode 100644 molecule/resources/host_vars/debian-11.yml create mode 100644 molecule/resources/host_vars/debian-12.yml diff --git a/molecule/resources/Dockerfile.debian-python3.j2 b/molecule/resources/Dockerfile.debian-python3.j2 new file mode 100644 index 0000000..b2844e8 --- /dev/null +++ b/molecule/resources/Dockerfile.debian-python3.j2 @@ -0,0 +1,25 @@ +# Molecule managed + +FROM {{ item.image }} + +RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y systemd && apt-get clean; fi +RUN if [ ! -e /sbin/init ]; then ln -s /lib/systemd/systemd /sbin/init ; fi + +ENV container docker + +# Don't start the optional systemd services. +RUN find /etc/systemd/system \ + /lib/systemd/system \ + -path '*.wants/*' \ + -not -name '*journald*' \ + -not -name '*systemd-tmpfiles*' \ + -not -name '*systemd-user-sessions*' \ + -exec rm \{} \; + +RUN systemctl set-default multi-user.target + +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 python3 sudo bash net-tools ca-certificates && apt-get clean; fi \ No newline at end of file diff --git a/molecule/resources/host_vars/debian-11.yml b/molecule/resources/host_vars/debian-11.yml new file mode 100644 index 0000000..0a909a2 --- /dev/null +++ b/molecule/resources/host_vars/debian-11.yml @@ -0,0 +1,3 @@ +--- + +ansible_python_interpreter: "/usr/bin/python3" \ No newline at end of file diff --git a/molecule/resources/host_vars/debian-12.yml b/molecule/resources/host_vars/debian-12.yml new file mode 100644 index 0000000..0a909a2 --- /dev/null +++ b/molecule/resources/host_vars/debian-12.yml @@ -0,0 +1,3 @@ +--- + +ansible_python_interpreter: "/usr/bin/python3" \ No newline at end of file