test(roles): run the Ubuntu roles on 24.04 and 26.04 and declare exactly those
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:
1 parent
3bfc485076
commit
2e1ad033e4
43 files changed
+322
-98
No files matched your search
+2
-4
@@ -4,9 +4,7 @@ Installs UFW and applies sysctl overrides, `/etc/ufw/before.rules`, default poli
|
||||
|
||||
## Supported platforms
|
||||
|
||||
Ubuntu 24.04 (noble), the platform the molecule scenario runs on.
|
||||
|
||||
Untested platforms: Ubuntu 22.04 (jammy), listed in `meta/main.yml` but not verified by a test.
|
||||
Ubuntu 24.04 (noble) and 26.04 (resolute), the platforms the molecule scenario runs on.
|
||||
|
||||
Ubuntu hosts only: the role firewalls Ubuntu guests; the `pve` profile of `system_baseline` does not install ufw, so Proxmox hosts are not targeted.
|
||||
|
||||
@@ -138,7 +136,7 @@ Skipping `ufw_aggregate` leaves the lists the later tasks read (`ufw_aggregated_
|
||||
|
||||
## Tests
|
||||
|
||||
The scenario `molecule/default/` runs in CI only, on one platform: `${MOLECULE_IMAGE}`, an Ubuntu 24.04 (noble) container with `NET_ADMIN`. The sequence runs prepare, converge, idempotence and verify; it has no check-mode step.
|
||||
The scenario `molecule/default/` runs in CI only, on two platforms: `${MOLECULE_IMAGE}` (Ubuntu 24.04) and `${MOLECULE_IMAGE_2604}` (Ubuntu 26.04). Both containers get `NET_ADMIN`. The sequence runs prepare, converge, idempotence and verify; it has no check-mode step.
|
||||
|
||||
- Prepare installs ufw and stores rules the role must handle: an untagged manual rule, a manual rule the base list deletes, and tagged rules of service owners that are stale, removed or orphaned, some of them looking like an SSH path (port 22 with a source, no port, a range, an application profile named like SSH).
|
||||
- Converge applies the base `ufw_rules` (one entry with `delete: true`), then calls `service_rules` for several owners (purge on, purge off, `absent`), and `orphan_rules` with no list, an empty list, report only and purge.
|
||||
|
||||
@@ -9,8 +9,8 @@ galaxy_info:
|
||||
platforms:
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- jammy
|
||||
- noble
|
||||
- resolute
|
||||
galaxy_tags:
|
||||
- firewall
|
||||
- ufw
|
||||
|
||||
@@ -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 and the firewall tools need NET_ADMIN, nothing else.
|
||||
# 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 and the
|
||||
# firewall tools need NET_ADMIN, nothing else.
|
||||
driver:
|
||||
name: docker
|
||||
platforms:
|
||||
@@ -22,6 +23,23 @@ platforms:
|
||||
- NET_ADMIN
|
||||
security_opts:
|
||||
- apparmor=unconfined
|
||||
- name: ${KAMINO_RUN_ID:-local}-ufw-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
|
||||
verifier:
|
||||
|
||||
Reference in new issue
Block a user