The molecule-ubuntu2604 image cannot become root: sudo refuses with an account validation failure, so resolute is not testable yet. Like the other Ubuntu roles, pihole declares noble only and names resolute as an untested platform in its README. Assisted-by: Claude Code:claude-opus-5-5
64 lines
2.0 KiB
YAML
64 lines
2.0 KiB
YAML
---
|
|
# Runs on the repository's own runner (label kamino-molecule), in the molecule-ubuntu2404 image
|
|
# (MOLECULE_IMAGE, the pin 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
|
|
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
|