[DEPRECATION WARNING]: INJECT_FACTS_AS_VARS default to True is deprecated, top-level facts will not be auto injected after the change. This feature will be removed from ansible-core version 2.24.
Origin: …/mortis/kamino/roles/system_baseline/tasks/reboot.yml:7:9
When the default flips, bare top-level facts are undefined. Any consumer running with inject_facts_as_vars = False already sees that today.
Known uses on main
roles/system_baseline/tasks/reboot.yml:7: ansible_os_family. This one is in the reboot entry point, which consumers call directly.
roles/docker/tasks/install.yml:33: ansible_distribution_release in the APT source line.
The argument specs and READMEs of both roles name these facts.
A full sweep is needed, because the grep above only checked common names: every ansible_<fact> outside ansible_facts[...] in roles/, plus the molecule scenarios.
Fix
Use ansible_facts['os_family'], ansible_facts['distribution_release'] and so on, and update the argument specs and READMEs.
Add inject_facts_as_vars = False to the Collection's test config (molecule ansible.cfg / ANSIBLE_INJECT_FACT_VARS=False), so a regression fails in CI.
Changelog fragment (bugfix). Behaviour is unchanged for consumers.
Acceptance
No INJECT_FACTS_AS_VARS deprecation warning from any role in the Molecule runs.
The Molecule scenarios pass with fact injection off.
Assisted-by: Claude Code:claude-opus-5-5
## Problem
ansible-core 2.22 warns at runtime:
> [DEPRECATION WARNING]: INJECT_FACTS_AS_VARS default to `True` is deprecated, top-level facts will not be auto injected after the change. This feature will be removed from ansible-core version 2.24.
> Origin: …/mortis/kamino/roles/system_baseline/tasks/reboot.yml:7:9
When the default flips, bare top-level facts are undefined. Any consumer running with `inject_facts_as_vars = False` already sees that today.
## Known uses on main
- `roles/system_baseline/tasks/reboot.yml:7`: `ansible_os_family`. This one is in the `reboot` entry point, which consumers call directly.
- `roles/docker/tasks/install.yml:33`: `ansible_distribution_release` in the APT source line.
- The argument specs and READMEs of both roles name these facts.
A full sweep is needed, because the grep above only checked common names: every `ansible_<fact>` outside `ansible_facts[...]` in `roles/`, plus the molecule scenarios.
## Fix
- Use `ansible_facts['os_family']`, `ansible_facts['distribution_release']` and so on, and update the argument specs and READMEs.
- Add `inject_facts_as_vars = False` to the Collection's test config (molecule `ansible.cfg` / `ANSIBLE_INJECT_FACT_VARS=False`), so a regression fails in CI.
- Changelog fragment (bugfix). Behaviour is unchanged for consumers.
## Acceptance
- No `INJECT_FACTS_AS_VARS` deprecation warning from any role in the Molecule runs.
- The Molecule scenarios pass with fact injection off.
Assisted-by: Claude Code:claude-opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
ansible-core 2.22 warns at runtime:
When the default flips, bare top-level facts are undefined. Any consumer running with
inject_facts_as_vars = Falsealready sees that today.Known uses on main
roles/system_baseline/tasks/reboot.yml:7:ansible_os_family. This one is in therebootentry point, which consumers call directly.roles/docker/tasks/install.yml:33:ansible_distribution_releasein the APT source line.A full sweep is needed, because the grep above only checked common names: every
ansible_<fact>outsideansible_facts[...]inroles/, plus the molecule scenarios.Fix
ansible_facts['os_family'],ansible_facts['distribution_release']and so on, and update the argument specs and READMEs.inject_facts_as_vars = Falseto the Collection's test config (moleculeansible.cfg/ANSIBLE_INJECT_FACT_VARS=False), so a regression fails in CI.Acceptance
INJECT_FACTS_AS_VARSdeprecation warning from any role in the Molecule runs.Assisted-by: Claude Code:claude-opus-5-5