fix(images): let become work on molecule-ubuntu2604 and add gnupg
Build / build (pull_request) Successful in 30s
Molecule / molecule (pull_request) Failing after 1m4s
Lint / lint (pull_request) Successful in 1m56s

In the booted 26.04 container, pam_unix's account check for sudo runs
the unix_chkpwd helper, which fails there, so become from root fails
with "account validation failure". /etc/pam.d/sudo now lets root
through with pam_rootok before common-account; a non-root caller still
goes through pam_unix. The build fails if the line does not apply.

gnupg joins the image, as in the 24.04 image: the docker and gitea
scenarios need it on the target. The temporary diagnostics are removed.

Closes #376

Assisted-by: Claude Code
This commit is contained in:
Defame1297 committed 2026-11-25 21:42:58 +00:00
1 parent 5364f18728
commit efd3a550c5
3 files changed
+15 -26

No files matched your search

+3 -1
View File
@@ -12,7 +12,9 @@ It is the release the hosts are moving to; the roles are tested on it next to 24
`ca-certificates`.
- Python for Ansible on the target: `python3`, `python3-apt`, `python3-systemd`.
- The packages the roles manage, preinstalled so a converge makes no network calls:
`iptables`, `ufw`, `fail2ban`, `openssh-server` (the `ssh` unit is enabled).
`iptables`, `ufw`, `fail2ban`, `openssh-server` (the `ssh` unit is enabled), and `gnupg`
(the docker scenario signs its stand-in APT repository with it).
- root's `sudo` skips the PAM account check (`pam_rootok`), so `become` works in the container.
- Throwaway SSH host keys and a machine-id generated at build time. They are not secrets and the
image is a test target that must never be exposed to a network.