test: Configure Molecule testing framework

- Add Ansible collections configuration
- Update converge and prepare playbooks
- Restructure molecule.yml for improved testing
This commit is contained in:
Daniel Akulenok
2026-01-23 00:30:22 +01:00
committed by Daniel Akulenok
parent 7fc4c26217
commit 8c0961dd13
5 changed files with 35 additions and 17 deletions

View File

@@ -18,7 +18,7 @@
- "{{ bind9_libdir }}" - "{{ bind9_libdir }}"
dest: "{{ dest: "{{
bind9_backup_dir + '/bind9-config-' + bind9_backup_dir + '/bind9-config-' +
ansible_date_time.iso8601_basic_short + '.tar.gz' }}" ansible_facts.date_time.iso8601_basic_short + '.tar.gz' }}"
owner: root owner: root
group: root group: root
mode: 0640 mode: 0640

View File

@@ -0,0 +1,7 @@
---
collections:
- name: ansible.utils
- name: ansible.posix
- name: community.crypto
- name: community.general

View File

@@ -1,5 +1,7 @@
--- ---
- name: Converge - name: Converge
hosts: all hosts: all
roles: tasks:
- keepit.bind9 - name: Include bind9 role
ansible.builtin.include_role:
name: ../../../ansible-bind9-role

View File

@@ -1,22 +1,25 @@
--- ---
dependency:
name: galaxy
driver: driver:
name: podman name: podman
platforms: platforms:
- name: ubuntu-jammy - name: debian-bookworm
image: ubuntu:jammy image: docker.io/jrei/systemd-debian:12
- name: ubuntu-focal command: /lib/systemd/systemd
image: ubuntu:focal privileged: true
- name: debian-bullseye volumes:
image: debian:bullseye - /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
- name: debian-trixie
image: docker.io/jrei/systemd-debian:13
command: /lib/systemd/systemd
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
provisioner: provisioner:
name: ansible name: ansible
lint: config_options:
name: ansible-lint defaults:
ALLOW_BROKEN_CONDITIONALS: true
verifier: verifier:
name: ansible name: ansible
lint: |
set -e
ansible-lint .
yamllint .

View File

@@ -0,0 +1,6 @@
---
- hosts: all
tasks:
- name: Update apt
ansible.builtin.apt:
update_cache: true