Files
Kamino/roles/pihole/molecule/default/molecule.yml
T
Defame1297 2e1ad033e4
Build / build (pull_request) Successful in 51s
Lint / lint (pull_request) Successful in 3m42s
Molecule / molecule (pull_request) Failing after 20m50s
test(roles): run the Ubuntu roles on 24.04 and 26.04 and declare exactly those
Every role except network_interfaces runs its molecule scenarios on the
24.04 and 26.04 images and declares Ubuntu noble and resolute; jammy and
Ubuntu all are dropped. trixie stays declared until the Debian 13 image
(#226) tests it. docker and gitea stay on noble until the 26.04 image
ships gnupg (#378).

Closes #133

Assisted-by: Claude Code
2026-11-25 20:17:53 +00:00

80 lines
2.4 KiB
YAML

---
# Runs on the repository's own runner (label kamino-molecule), in the molecule-ubuntu2404
# (MOLECULE_IMAGE) and molecule-ubuntu2604 (MOLECULE_IMAGE_2604) images, pinned in
# .gitea/workflows/molecule.yml. Needs outbound network for the apt packages. The upstream Pi-hole
# repository is replaced by a local stub whose installer only logs its arguments (prepare.yml), so
# the scenario tests the role's own logic, not Pi-hole itself. The containers run systemd as PID 1
# with a writable cgroup; no privileged mode.
driver:
name: docker
platforms:
- name: ${KAMINO_RUN_ID:-local}-pihole-noble
labels:
net.rkdr.mortis.molecule-run: "${KAMINO_RUN_ID:-local}"
image: ${MOLECULE_IMAGE}
pre_build_image: true
pull: true
command: /sbin/init
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /run
- /run/lock
security_opts:
- apparmor=unconfined
- name: ${KAMINO_RUN_ID:-local}-pihole-resolute
labels:
net.rkdr.mortis.molecule-run: "${KAMINO_RUN_ID:-local}"
image: ${MOLECULE_IMAGE_2604}
pre_build_image: true
pull: true
command: /sbin/init
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /run
- /run/lock
security_opts:
- apparmor=unconfined
provisioner:
name: ansible
# One source for every play, so the converge and the negative tests in verify.yml start from
# the same valid input.
inventory:
group_vars:
all:
pihole_test_overrides:
repo:
remote: file:///opt/pihole-stub.git
config:
dns:
# not eth0, so verify proves the variable reaches pihole.toml
interface: molecule0
upstreams:
- 9.9.9.9
- 149.112.112.112
webserver:
api:
password: molecule-test-password
verifier:
name: ansible
scenario:
# molecule's default sequence minus both destroys (scripts/run_molecule_scenarios.sh removes the
# containers as soon as this scenario ends; after a local run, run `molecule destroy` yourself),
# plus two check steps: one before the converge (first-run preview), one after the idempotence run.
test_sequence:
- dependency
- cleanup
- syntax
- create
- prepare
- check
- converge
- idempotence
- check
- side_effect
- verify
- cleanup