Skip to content

Fix Ansible deprecation warning#40

Open
danclough wants to merge 1 commit intoweareinteractive:masterfrom
danclough:master
Open

Fix Ansible deprecation warning#40
danclough wants to merge 1 commit intoweareinteractive:masterfrom
danclough:master

Conversation

@danclough
Copy link
Copy Markdown

@danclough danclough commented Apr 3, 2026

This pull request resolves the Ansible deprecation warning observed in newer Ansible versions which advises to use ansible_facts instead of ansible_ variables.

[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg.
[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: roles/weareinteractive.sudo/tasks/vars.yml:6:7
4   include_vars: "{{ item }}"
5   with_first_found:
6     - "{{ ansible_distribution }}.yml"
        ^ column 7
Use `ansible_facts["fact_name"]` (no `ansible_` prefix) instead.

Thanks for all your work to create this excellent Ansible role!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant