Commit Graph
2 Commits
Author SHA1 Message Date
Defame1297 6fee0ea8b2 fix(ufw): detect check mode without a command's skipped result
The probes in install.yml, orphan_rules.yml, service_rules.yml and
sysctl.yml took a skipped `command` task as the sign of check mode.
ansible-core 2.22 deprecates that: command.py marks its check-mode
`r['skipped'] = True` for removal in 2.25, and the 2.22 changelog says
"Returning skipped from a module or action plugin is deprecated and will be
removed in ansible-core 2.25". The probe would then report ok, and the role
would delete rules and edit sysctl.conf under --check.

The probe now runs `echo ran` and reads its output: a command does not run
in check mode, under --check or the check_mode keyword, so the output is
empty there. Checked against ansible-core 2.22 and a copy with the skipped
return removed, in a normal play, a check_mode play and --check.
service_rules.yml had the same probe and is changed with the others.

Assisted-by: Claude Code
2026-12-02 08:44:38 +00:00
Defame1297andClaude Opus 5.5 e18db424ec feat(ufw): add the ufw role
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Failing after 25s
Molecule / molecule (pull_request) Failing after 5m42s
Copied from the environment repository's local role. The files are
identical except: galaxy namespace mortis; comments, argument_specs
descriptions and the README scrubbed of environment references (issue
numbers, CI runs, playbooks, inventory paths and groups, scripts and
caller roles by name), with the technical explanation kept and reworded
generically; the stray-variable guard's fail message drops its issue
reference; the molecule scenario calls the role by its FQCN
(mortis.kamino.ufw), follows the Kamino scenario conventions
(kamino-molecule header, scenario.test_sequence) and no longer sets
ANSIBLE_COLLECTIONS_PATH or ANSIBLE_ROLES_PATH. No variable, default,
argument_specs type or task logic changed; the test coverage is the same.

The README follows the other Kamino roles: purpose, the main,
service_rules and orphan_rules entry points, variables, and example
plays with the FQCN and tasks_from. The meta licence stays
GPL-3.0-or-later AND GPL-3.0-only (templates/before.rules.j2 is derived
from ufw's own file, already annotated in REUSE.toml and NOTICE).
galaxy.yml's dependency comment names ufw as a community.general user.

Not verified locally: the molecule scenario (it runs on the
kamino-molecule runner in CI) and ansible-test sanity.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-14 16:43:29 +00:00