From e1cf6af06d2aa36bc131505cd42270f01c94f057 Mon Sep 17 00:00:00 2001 From: Daniel Goldman Date: Thu, 3 Feb 2022 14:45:11 -0500 Subject: [PATCH] add `undef()` keyword to core 2.12 porting guide (#76880) --- .../rst/porting_guides/porting_guide_core_2.12.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/docsite/rst/porting_guides/porting_guide_core_2.12.rst b/docs/docsite/rst/porting_guides/porting_guide_core_2.12.rst index b57840ce692..bb6ff0a72dd 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_core_2.12.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_core_2.12.rst @@ -32,6 +32,15 @@ Playbook vars: ansible_async_dir: /path/to/my/custom/dir +* The ``undef()`` function is added to the templating environment for creating undefined variables directly in a template. Optionally, a hint may be provided for variables which are intended to be overridden. + +.. code-block:: yaml + + vars: + old: "{{ undef }}" + new: "{{ undef() }}" + new_with_hint: "{{ undef(hint='You must override this variable') }}" + Python Interpreter Discovery ============================