Skip to content

Ansible deprecation warning: top-level facts will not be auto injected #392

@dometto

Description

@dometto

INJECT_FACTS_AS_VARS defaulting to True is deprecated in Ansible and will switch to False in ansible-core 2.24. Top-level facts (e.g., ansible_os_family) will no longer be automatically injected, meaning you must switch to using the ansible_facts['fact_name'] dictionary format to avoid breaking changes.
What is Changing

Old Way (Deprecated): Using ansible_distribution or ansible_os_family directly.
New Way (Required): Using ansible_facts['distribution'] or ansible_facts['os_family'].

This will only affect us when SURF updates the ansible version on workspaces, but it's good to be ready.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions