fix(pihole): declare and test noble only
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
This commit is contained in:
1 parent
910d79768a
commit
8c00be1af2
4 files changed
+7
-22
No files matched your search
@@ -1,7 +1,7 @@
|
||||
---
|
||||
minor_changes:
|
||||
- >-
|
||||
pihole - New role. Installs Pi-hole v6 on Ubuntu noble and resolute by cloning the upstream repository and running
|
||||
pihole - New role. Installs Pi-hole v6 on Ubuntu noble by cloning the upstream repository and running
|
||||
its installer unattended, with ``pihole.toml`` rendered from ``pihole_default`` merged with ``pihole_overrides``.
|
||||
``pihole_web_password`` is a required secret input, and ``pihole_overrides`` must set ``config.dns.interface``.
|
||||
A change to ``pihole.toml`` runs the installer's reconfigure mode. Derived from codeberg.org/ansible/pihole
|
||||
|
||||
@@ -4,7 +4,9 @@ Installs [Pi-hole](https://pi-hole.net) v6 by cloning the upstream repository an
|
||||
|
||||
## Supported platforms
|
||||
|
||||
Ubuntu 24.04 (noble) and 26.04 (resolute), the platforms the molecule scenario runs on. The role asserts that the host is Ubuntu before any change. The package dependencies come from `ansible.builtin.apt`. The host needs outbound access to the upstream Pi-hole repository (`repo.remote` in the merged settings) and to the apt mirrors.
|
||||
Ubuntu 24.04 (noble), the platform the molecule scenario runs on. The role asserts that the host is Ubuntu before any change. The package dependencies come from `ansible.builtin.apt`. The host needs outbound access to the upstream Pi-hole repository (`repo.remote` in the merged settings) and to the apt mirrors.
|
||||
|
||||
Untested platforms: Ubuntu 26.04 (resolute). The apt dependencies exist there, but the scenario does not run on it yet.
|
||||
|
||||
The role targets Ubuntu hosts that serve DNS, not Proxmox nodes, so it does not cover Debian trixie: the upstream installer is run on the Ubuntu hosts it is tested on.
|
||||
|
||||
@@ -58,7 +60,7 @@ The input asserts carry `always` (and `assert`), so they run whatever tags are s
|
||||
|
||||
## Tests
|
||||
|
||||
The `default` molecule scenario runs on noble and resolute. It replaces the upstream repository with a local stub whose installer only logs its arguments and creates the database file, so it tests the merge, the asserts, the user, the configuration directory and the rendered `pihole.toml` (owner, group and mode), the clone's checked-out version, the installer sequence (install once, then reconfigure from the handler) and idempotence, not Pi-hole itself: no pihole-FTL service runs, so that the service loaded the configuration is not verified. It runs `check` before the converge (a first-run preview) and after the idempotence run. Negative tests in `verify.yml` cover a host without Ubuntu facts, a missing `pihole_web_password`, an unset interface, empty upstreams, a non-string password and the placeholder password.
|
||||
The `default` molecule scenario runs on noble. It replaces the upstream repository with a local stub whose installer only logs its arguments and creates the database file, so it tests the merge, the asserts, the user, the configuration directory and the rendered `pihole.toml` (owner, group and mode), the clone's checked-out version, the installer sequence (install once, then reconfigure from the handler) and idempotence, not Pi-hole itself: no pihole-FTL service runs, so that the service loaded the configuration is not verified. It runs `check` before the converge (a first-run preview) and after the idempotence run. Negative tests in `verify.yml` cover a host without Ubuntu facts, a missing `pihole_web_password`, an unset interface, empty upstreams, a non-string password and the placeholder password.
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ galaxy_info:
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- noble
|
||||
- resolute
|
||||
galaxy_tags:
|
||||
- pihole
|
||||
- dns
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
# 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
|
||||
# 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.
|
||||
@@ -23,21 +22,6 @@ platforms:
|
||||
- /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
|
||||
|
||||
Reference in new issue
Block a user