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
@@ -4,7 +4,7 @@ Installs cloudflared as a systemd service for a locally managed Cloudflare Tunne
|
||||
|
||||
## Supported platforms
|
||||
|
||||
Ubuntu 24.04 (noble), the platform the molecule scenario runs on. The role downloads the `cloudflared-linux-amd64` binary only, so other architectures are unsupported, and it needs `systemd`. The tasks that call the Cloudflare API run on the controller (`delegate_to: localhost`) and need the `community.general` collection (`cloudflare_dns`) there; the `mint` entry point also needs the `openssl` command on the controller. The target needs outbound access to github.com and to Cloudflare's edge; the role defines no firewall rules because the daemon only connects outbound.
|
||||
Ubuntu 24.04 (noble) and 26.04 (resolute), the platforms the molecule scenario runs on. The role downloads the `cloudflared-linux-amd64` binary only, so other architectures are unsupported, and it needs `systemd`. The tasks that call the Cloudflare API run on the controller (`delegate_to: localhost`) and need the `community.general` collection (`cloudflare_dns`) there; the `mint` entry point also needs the `openssl` command on the controller. The target needs outbound access to github.com and to Cloudflare's edge; the role defines no firewall rules because the daemon only connects outbound.
|
||||
|
||||
The role targets Ubuntu hosts that run the tunnel daemon, not Proxmox nodes, so it does not cover Debian trixie.
|
||||
|
||||
@@ -106,7 +106,7 @@ Remove with `-e "cloudflared_remove=true cloudflared_remove_data=true"`; only `c
|
||||
|
||||
## Tests
|
||||
|
||||
The `default` molecule scenario runs on one platform, Ubuntu 24.04 (noble) (`${MOLECULE_IMAGE}`), without Cloudflare: a stub cloudflared binary stands in for the daemon, the downloads come from local `file://` URLs, and a stub of the Cloudflare API on the controller's loopback (`molecule/default/files/cloudflare_api_stub.py`, reached through `cloudflared_api_base_url`) answers the tunnel, zone and DNS record calls. It covers the converge with `cloudflared_manage_dns` false and an update through `_binary_update` (and its idempotence), the rendered `config.yml`, credentials file and unit, a stale credentials file, a failed checksum that leaves the daemon running, the input asserts, the deleted-tunnel and DNS guards, the `mint` entry point (confirm guard, CI refusal, no-op, check mode and a mint against the stub, run as child processes) and the remove path. The `community.general.cloudflare_dns` calls, which cannot be pointed at the stub, are not covered: creating, pruning and deleting records.
|
||||
The `default` molecule scenario runs in CI only, on two platforms: `${MOLECULE_IMAGE}` (Ubuntu 24.04) and `${MOLECULE_IMAGE_2604}` (Ubuntu 26.04). It runs without Cloudflare: a stub cloudflared binary stands in for the daemon, the downloads come from local `file://` URLs, and a stub of the Cloudflare API on the controller's loopback (`molecule/default/files/cloudflare_api_stub.py`, reached through `cloudflared_api_base_url`) answers the tunnel, zone and DNS record calls. It covers the converge with `cloudflared_manage_dns` false and an update through `_binary_update` (and its idempotence), the rendered `config.yml`, credentials file and unit, a stale credentials file, a failed checksum that leaves the daemon running, the input asserts, the deleted-tunnel and DNS guards, the `mint` entry point (confirm guard, CI refusal, no-op, check mode and a mint against the stub, run as child processes) and the remove path. The `community.general.cloudflare_dns` calls, which cannot be pointed at the stub, are not covered: creating, pruning and deleting records.
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ galaxy_info:
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- noble
|
||||
- resolute
|
||||
galaxy_tags:
|
||||
- cloudflared
|
||||
- cloudflare
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
---
|
||||
# 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 Cloudflare and no real
|
||||
# cloudflared: prepare.yml starts a stub of the Cloudflare API on the controller's loopback
|
||||
# (files/cloudflare_api_stub.py, reached through cloudflared_api_base_url; cleanup.yml stops it)
|
||||
# and seeds a stub cloudflared binary that reports an older version, so the update downloads its
|
||||
# new stub from local file:// URLs. The scenario downloads nothing. cloudflared_manage_dns is
|
||||
# false here because community.general.cloudflare_dns cannot be pointed at the stub; the DNS
|
||||
# guards in front of it are run with it true in verify.yml.
|
||||
# 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 Cloudflare and no real cloudflared: prepare.yml starts a stub of
|
||||
# the Cloudflare API on the controller's loopback (files/cloudflare_api_stub.py, reached through
|
||||
# cloudflared_api_base_url; cleanup.yml stops it) and seeds a stub cloudflared binary that reports
|
||||
# an older version, so the update downloads its new stub from local file:// URLs. The scenario
|
||||
# downloads nothing. cloudflared_manage_dns is false here because community.general.cloudflare_dns
|
||||
# cannot be pointed at the stub; the DNS guards in front of it are run with it true in verify.yml.
|
||||
# The container runs systemd as PID 1 with a writable cgroup; no privileged mode.
|
||||
driver:
|
||||
name: docker
|
||||
@@ -26,6 +26,21 @@ platforms:
|
||||
- /run/lock
|
||||
security_opts:
|
||||
- apparmor=unconfined
|
||||
- name: ${KAMINO_RUN_ID:-local}-cloudflared-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
|
||||
security_opts:
|
||||
- apparmor=unconfined
|
||||
provisioner:
|
||||
name: ansible
|
||||
# One source for every play, so a verify play that runs the role again renders the same
|
||||
|
||||
Reference in new issue
Block a user