The pihole and user_management scenarios read getent_passwd and
getent_shadow as top-level variables. The getent module returns them as
facts, which are injected as variables only while inject_facts_as_vars
is on, so with the setting this pull request turns on in the molecule
job the two verify plays failed (exit 2 in both runs of this pull
request, whose per-scenario logs were not printed).
They now read ansible_facts['getent_passwd'] and
ansible_facts['getent_shadow']. The remaining module-returned facts in
roles/ and extensions/ (package_facts, service_facts, the getent read in
user_management's ssh_keys.yml) are already read through ansible_facts.
Assisted-by: Claude Code:claude-sonnet-5-5
verify.yml now checks the group of pihole.toml, the owner, group and mode
of /etc/pihole, and that the clone is checked out at the repo.version the
converge used, read from the role defaults. The molecule.yml comment
describes the test sequence accurately.
Assisted-by: Claude Code:claude-opus-5-5
Runs on noble and resolute without the real Pi-hole: the clone target
is a local git repository whose installer is a stub that logs its
arguments and creates the database file.
Covers a check run before the converge and after idempotence, the
merge, the rendered pihole.toml (upstreams, interface, hashed
password, owner and mode), the system user, the installer sequence
(install once, then reconfigure from the handler) and a negative test
for every validation: no Ubuntu facts, a missing pihole_web_password,
an unset interface, empty upstreams, a non-string and a placeholder
password. No pihole-FTL service runs, so the loaded configuration is
not verified.
Assisted-by: Claude Code:claude-opus-5-5