chore: clear remaining deprecations after the ansible_facts migration #6

Merged
claudiomaradonna merged 3 commits from chore/deprecation-cleanup into main 2026-09-25 14:58:17 +02:00

Follow-up to the inject_facts_as_vars = False work. A sweep with
deprecation warnings enabled found no remaining runtime deprecations;
these three commits clear what was left.

  • refactor(firewall-apply): drop redundant bool filters on booleans
    firewall_apply_open is already cast with | bool where it is defined,
    and firewall_apply_keep is a boolean expression, so filtering either
    again changed nothing. Under ansible-lint the nested task vars render as
    raw strings, and the extra filter printed the bool coercion
    deprecation that ansible-core 2.23 turns into an error. The rendered
    firewall rules are unchanged, so no host sees a different ruleset.
  • chore(roles): raise min_ansible_version to 2.21
    The declared floor of 2.15 is long out of support and was never tested.
    2.21 is the ansible-core pinned in requirements-dev.txt.
  • docs(fail2ban-basic): link the current os_family docs
    The link pointed at the ansible 2.6 documentation.

Verification

  • make VENV=.venv-jail check passes with ANSIBLE_DEPRECATION_WARNINGS=1
    and prints no deprecation warnings (it printed two before this change).
  • Not run: make test (molecule) and make verify, because podman was
    unavailable in that environment.

Left out on purpose

  • .yamllint doesn't match what ansible-lint expects
    (octal-values.forbid-implicit-octal, comments.min-spaces-from-content).
  • ansible-lint 26.9.0 is available; the pin is 26.8.0.
  • Molecule scenarios cover Debian 12 only.
Follow-up to the `inject_facts_as_vars = False` work. A sweep with deprecation warnings enabled found no remaining runtime deprecations; these three commits clear what was left. - **refactor(firewall-apply): drop redundant bool filters on booleans** `firewall_apply_open` is already cast with `| bool` where it is defined, and `firewall_apply_keep` is a boolean expression, so filtering either again changed nothing. Under ansible-lint the nested task vars render as raw strings, and the extra filter printed the `bool` coercion deprecation that ansible-core 2.23 turns into an error. The rendered firewall rules are unchanged, so no host sees a different ruleset. - **chore(roles): raise min_ansible_version to 2.21** The declared floor of 2.15 is long out of support and was never tested. 2.21 is the ansible-core pinned in `requirements-dev.txt`. - **docs(fail2ban-basic): link the current os_family docs** The link pointed at the ansible 2.6 documentation. ## Verification - `make VENV=.venv-jail check` passes with `ANSIBLE_DEPRECATION_WARNINGS=1` and prints no deprecation warnings (it printed two before this change). - Not run: `make test` (molecule) and `make verify`, because podman was unavailable in that environment. ## Left out on purpose - `.yamllint` doesn't match what ansible-lint expects (`octal-values.forbid-implicit-octal`, `comments.min-spaces-from-content`). - ansible-lint 26.9.0 is available; the pin is 26.8.0. - Molecule scenarios cover Debian 12 only.
firewall_apply_open is already cast with | bool where it is defined, and
firewall_apply_keep is a boolean expression, so piping either through
| bool again changes nothing at runtime. Under ansible-lint the nested
task vars render as raw strings, and the extra filter printed the bool
coercion deprecation that ansible-core 2.23 turns into an error.
The declared floor was 2.15, long out of support and never exercised.
2.21 is the ansible-core pinned in requirements-dev.txt, the only
version the gates and molecule run against.
The OS family link pointed at the ansible 2.6 documentation.
claudiomaradonna deleted branch chore/deprecation-cleanup 2026-09-25 14:58:22 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
claudiomaradonna/castrum!6
No description provided.