restore inadvertently deleted default for convert_data. Fixes #77004 (#77016)

This commit is contained in:
Matt Martz
2022-02-14 08:21:17 -06:00
committed by GitHub
parent c9d3518d2f
commit 3779c1f278
4 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,3 @@
bugfixes:
- template lookup - restore inadvertently deleted default for ``convert_data``
(https://github.com/ansible/ansible/issues/77004)

View File

@ -20,6 +20,7 @@ DOCUMENTATION = """
description:
- Whether to convert YAML into data. If False, strings that are YAML will be left untouched.
- Mutually exclusive with the jinja2_native option.
default: true
variable_start_string:
description: The string marking the beginning of a print statement.
default: '{{'

View File

@ -25,3 +25,10 @@
- assert:
that:
- "hello_world_comment|trim == 'Hello world!'"
# 77004
- assert:
that:
- lookup('template', 'dict.j2') is mapping
- lookup('template', 'dict.j2', convert_data=True) is mapping
- lookup('template', 'dict.j2', convert_data=False) is not mapping

View File

@ -0,0 +1 @@
{"foo": "{{ 'bar' }}"}