Files
Kamino/extensions/molecule/image-smoke-2604/verify.yml
T
Defame1297andClaude Sonnet 5.5 b27513f0bd
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 12s
Molecule / molecule (pull_request) Successful in 1m2s
feat(molecule): test the 26.04 image and move the 24.04 pin to 0.1.2
Adds the image-smoke-2604 scenario (asserts Ubuntu 26.04) and the MOLECULE_IMAGE_2604 pin
(molecule-ubuntu2604 0.1.0, the digest its first build printed, run 2534). Moves
MOLECULE_IMAGE to molecule-ubuntu2404 0.1.2 (digest printed by run 2541): the 0.1.1 image
is Ubuntu 26.04, so image-smoke has failed on main since the base bump. The Renovate
pattern for the multi-line pin now also reads MOLECULE_IMAGE_<release>.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-26 19:16:51 +00:00

59 lines
1.8 KiB
YAML

---
- name: Verify the molecule image contract
hosts: all
gather_facts: true
tasks:
- name: The instance is Ubuntu 26.04 with systemd as the service manager
ansible.builtin.assert:
that:
- ansible_facts['distribution'] == 'Ubuntu'
- ansible_facts['distribution_version'] == '26.04'
- ansible_facts['service_mgr'] == 'systemd'
quiet: true
- name: Gather package facts
ansible.builtin.package_facts:
manager: auto
- name: The packages the roles manage are preinstalled
ansible.builtin.assert:
that: item in ansible_facts['packages']
quiet: true
loop:
- systemd
- systemd-sysv
- dbus
- sudo
- iproute2
- ca-certificates
- python3
- python3-apt
- python3-systemd
- iptables
- ufw
- fail2ban
- openssh-server
- name: Query the units a role scenario relies on
ansible.builtin.systemd:
name: "{{ item }}"
register: kamino_smoke_units
loop:
- dbus
- ssh
- name: The dbus unit is running and ssh is enabled
ansible.builtin.assert:
that:
- (kamino_smoke_units.results | selectattr('item', 'equalto', 'dbus') | first).status.ActiveState == 'active'
- (kamino_smoke_units.results | selectattr('item', 'equalto', 'ssh') | first).status.UnitFileState == 'enabled'
quiet: true
- name: The Python bindings Ansible's apt and systemd support need import
ansible.builtin.command: /usr/bin/python3 -c 'import apt, systemd.journal'
changed_when: false
- name: NET_ADMIN is granted, so the firewall tools can work
ansible.builtin.command: iptables -S
changed_when: false