test(roles): run the Ubuntu roles on 24.04 and 26.04 and declare exactly those
Build / build (pull_request) Successful in 51s
Lint / lint (pull_request) Successful in 3m42s
Molecule / molecule (pull_request) Failing after 20m50s

Every role except network_interfaces runs its molecule scenarios on the
24.04 and 26.04 images and declares Ubuntu noble and resolute; jammy and
Ubuntu all are dropped. trixie stays declared until the Debian 13 image
(#226) tests it. docker and gitea stay on noble until the 26.04 image
ships gnupg (#378).

Closes #133

Assisted-by: Claude Code
This commit is contained in:
Defame1297 committed 2026-11-25 20:17:53 +00:00
1 parent 3bfc485076
commit 2e1ad033e4
43 files changed
+322 -98

No files matched your search

+3 -3
View File
@@ -4,9 +4,9 @@ Manages the primary ansible user and additional users, their `authorized_keys`,
## Supported platforms
Ubuntu 24.04 (noble), the only platform converged by a test (see [Tests](#tests)). The role installs sudo with apt.
Ubuntu 24.04 (noble) and 26.04 (resolute), the platforms the molecule scenario runs on (see [Tests](#tests)). The role installs sudo with apt.
Untested platforms: Ubuntu 22.04 (jammy) and Debian trixie (Proxmox VE nodes), listed in `meta/main.yml`.
Untested platforms: Debian trixie (Proxmox VE nodes), listed in `meta/main.yml`.
## Requirements and run order
@@ -64,7 +64,7 @@ Both are set under the `always` tag.
## Tests
`molecule/default` runs in the Collection's CI, on one platform: Ubuntu 24.04 (noble), the `molecule-ubuntu2404` image (`${MOLECULE_IMAGE}`). Prepare creates a stale user to remove, plants an extra key in an existing user's `authorized_keys` for authoritative mode to drop, and sets root's password before converge; the role then locks it. The converge sets the primary user explicitly instead of through the `{{ ansible_user }}` default.
`molecule/default` runs in CI only, on two platforms: `${MOLECULE_IMAGE}` (Ubuntu 24.04) and `${MOLECULE_IMAGE_2604}` (Ubuntu 26.04). Prepare creates a stale user to remove, plants an extra key in an existing user's `authorized_keys` for authoritative mode to drop, and sets root's password before converge; the role then locks it. The converge sets the primary user explicitly instead of through the `{{ ansible_user }}` default.
Verify checks:
+1 -1
View File
@@ -9,8 +9,8 @@ galaxy_info:
platforms:
- name: Ubuntu
versions:
- jammy
- noble
- resolute
- name: Debian
versions:
- trixie
@@ -1,7 +1,8 @@
---
# Runs on the repository's own runner (label kamino-molecule), in the molecule-ubuntu2404 image
# (MOLECULE_IMAGE, the pin in .gitea/workflows/molecule.yml). No privileged mode: systemd needs a
# writable cgroup; NET_ADMIN keeps the container the same as the other role scenarios.
# Runs on the repository's own runner (label kamino-molecule), in the molecule-ubuntu2404
# (MOLECULE_IMAGE) and molecule-ubuntu2604 (MOLECULE_IMAGE_2604) images, pinned in
# .gitea/workflows/molecule.yml. No privileged mode: systemd needs a writable cgroup; NET_ADMIN
# keeps the container the same as the other role scenarios.
driver:
name: docker
platforms:
@@ -22,6 +23,23 @@ platforms:
- NET_ADMIN
security_opts:
- apparmor=unconfined
- name: ${KAMINO_RUN_ID:-local}-user-management-2604-instance
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
capabilities:
- NET_ADMIN
security_opts:
- apparmor=unconfined
provisioner:
name: ansible
inventory: