feat(ufw): add the ufw role #129

Merged
Defame1297 merged 2 commits from feat/ufw-role into main 2026-11-14 17:02:08 +00:00
Owner

Adds ufw, the next wave 1 role of the extraction, copied from the environment repository's local role. Release 1.4.0 follows in its own PR.

What changed against the source role

The tasks, defaults, vars, handlers, template and argument_spec types, defaults and required flags are identical. What differs:

  • meta/main.yml: namespace: mortis. The licence stays GPL-3.0-or-later AND GPL-3.0-only, because templates/before.rules.j2 is GPL-3.0-only. REUSE.toml and NOTICE already cover it, and this is the first file under that licence.
  • Comments, argument_spec descriptions, one fail_msg (an issue number dropped) and the README are rewritten without references to the environment repository: issue numbers, CI runs, playbooks, inventory paths, caller roles.
  • README: ufw_managed_owners is shown as not required (undefined or empty makes orphan_rules do nothing), matching the argument_specs. The source README called it required.
  • Molecule: Kamino conventions, the same as fail2ban (${MOLECULE_IMAGE}, test_sequence, no provisioner.env paths); 28 role references are now mortis.kamino.ufw. The test inputs and coverage are unchanged.
  • galaxy.yml: only the dependency comment changes (community.general is used by ufw too). There are no new dependencies.
  • Changelog fragment ufw-role.yml (minor_changes).

Checks

  • Local pre-commit hooks pass (REUSE, ansible-lint, conventional commit), and so does ansible-test sanity on push.
  • A review subagent compared the role with diff -r and found nothing blocking.
  • Molecule runs in CI only. This PR changes galaxy.yml, so every scenario runs.

🤖 Generated with Claude Code

Adds `ufw`, the next wave 1 role of the extraction, copied from the environment repository's local role. Release `1.4.0` follows in its own PR. ## What changed against the source role The tasks, defaults, vars, handlers, template and argument_spec types, defaults and `required` flags are identical. What differs: - `meta/main.yml`: `namespace: mortis`. The licence stays `GPL-3.0-or-later AND GPL-3.0-only`, because `templates/before.rules.j2` is GPL-3.0-only. `REUSE.toml` and `NOTICE` already cover it, and this is the first file under that licence. - Comments, argument_spec descriptions, one `fail_msg` (an issue number dropped) and the README are rewritten without references to the environment repository: issue numbers, CI runs, playbooks, inventory paths, caller roles. - README: `ufw_managed_owners` is shown as not required (undefined or empty makes `orphan_rules` do nothing), matching the argument_specs. The source README called it required. - Molecule: Kamino conventions, the same as `fail2ban` (`${MOLECULE_IMAGE}`, `test_sequence`, no `provisioner.env` paths); 28 role references are now `mortis.kamino.ufw`. The test inputs and coverage are unchanged. - `galaxy.yml`: only the dependency comment changes (`community.general` is used by `ufw` too). There are no new dependencies. - Changelog fragment `ufw-role.yml` (`minor_changes`). ## Checks - Local pre-commit hooks pass (REUSE, ansible-lint, conventional commit), and so does `ansible-test sanity` on push. - A review subagent compared the role with `diff -r` and found nothing blocking. - Molecule runs in CI only. This PR changes `galaxy.yml`, so every scenario runs. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Claude added 1 commit 2026-11-14 16:43:58 +00:00
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
e18db424ec
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
Defame1297 added 1 commit 2026-11-14 16:53:33 +00:00
fix(ufw): install the ufw package in prepare and name system_baseline without its FQCN
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 25s
Molecule / molecule (pull_request) Successful in 7m55s
077d8715bf
The rename to mortis.kamino.ufw also caught the package name in the scenario's prepare
step, so the package install failed. The role's docs named mortis.kamino.system_baseline,
which the role-independence test refuses; they now name the system_baseline role of this
Collection, and the README example no longer lists it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
Defame1297 scheduled this pull request to auto merge when all checks succeed 2026-11-14 16:54:30 +00:00
Defame1297 merged commit 1e42d48ba9 into main 2026-11-14 17:02:08 +00:00
Defame1297 deleted branch feat/ufw-role 2026-11-14 17:02:08 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#129