Editorial question93.8K views2,086 votes0 answers1,490 following
AI-generatedUndefined variable error in Ansible check mode when referencing ansible_facts without credentials
When running an Ansible playbook in check mode (--check) without supplying remote credentials, the intent is to validate syntax and logic without making any changes. However, if the playbook contains Jinja2 templates or variable expressions that reference facts such as {{ ansible_facts['distribution'] }}, check mode still attempts to evaluate those expressio