--- # Runs on the repository's own runner (label kamino-molecule), on both declared platforms: # molecule-ubuntu2404 (MOLECULE_IMAGE) and molecule-ubuntu2604 (MOLECULE_IMAGE_2604), the pins 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), # with a check run before the converge (first-run preview) and after the idempotence run. test_sequence: - dependency - cleanup - syntax - create - prepare - check - converge - idempotence - check - side_effect - verify - cleanup