Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/docsite/rst/porting_guides/porting_guide_core_2.19.rst
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,31 @@ Valid options are:
Multiple options can be combined by separating them with commas.


Displaying error when undefined variables in var_files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

In previous versions of ``ansible-core``, undefined variables from var_files were silently ignored and did not trigger errors.
This is now changed and an error will be displayed when undefined variables in var_files are encountered.

.. code-block:: yaml+jinja

- hosts: all
vars_files:
- "{{ inventory_dir }}/vars_files/foo.yml"

.. code-block:: ansible-output

PLAYBOOK: foo.yml ************************************************************************
1 plays in foo.yml
[WARNING]: skipping vars_file item due to an undefined variable
Origin: /examples/foo.yml:6:7

4
5 vars_files:
6 - "{{ inventory_dir }}/vars_files/foo.yml"
^ column 7


.. _plugin_api:

Plugin API
Expand Down