Skip to content

Commit 3579eb0

Browse files
committed
add conditional syntax error example
1 parent 5187df7 commit 3579eb0

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/docsite/rst/porting_guides/porting_guide_core_2.19.rst

+20
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,26 @@ This can be resolved by removing the unnecessary quotes:
326326
that: inventory_hostname is defined and inventory_hostname | length > 0
327327

328328

329+
Example - Expression Syntax Error
330+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
331+
332+
Previous Ansible releases could mask some expression syntax errors as a truthy result.
333+
334+
.. code-block:: yaml+jinja
335+
336+
- assert:
337+
that: 1 == 2,
338+
# ^ invalid comma
339+
340+
341+
The error reported is::
342+
343+
Syntax error in expression: chunk after expression
344+
345+
346+
This can be resolved by removing the invalid comma after the expression.
347+
348+
329349
Example - Jinja Order of Operations
330350
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
331351

0 commit comments

Comments
 (0)