From 8a754e0858d922e955e71b253c139e071ecec432 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 18:04:21 +0200 Subject: Adding upstream version 2.14.3. Signed-off-by: Daniel Baumann --- .../set_fact/set_fact_bool_conv_jinja2_native.yml | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 test/integration/targets/set_fact/set_fact_bool_conv_jinja2_native.yml (limited to 'test/integration/targets/set_fact/set_fact_bool_conv_jinja2_native.yml') diff --git a/test/integration/targets/set_fact/set_fact_bool_conv_jinja2_native.yml b/test/integration/targets/set_fact/set_fact_bool_conv_jinja2_native.yml new file mode 100644 index 0000000..2642599 --- /dev/null +++ b/test/integration/targets/set_fact/set_fact_bool_conv_jinja2_native.yml @@ -0,0 +1,35 @@ +- hosts: localhost + gather_facts: false + vars: + string_var: "no" + tasks: + - set_fact: + this_is_string: "yes" + this_is_not_string: yes + this_is_also_string: "{{ string_var }}" + this_is_another_string: !!str "{% set thing = '' + string_var + '' %}{{ thing }}" + this_is_more_strings: '{{ string_var + "" }}' + + - assert: + that: + - string_var == 'no' + - this_is_string == 'yes' + - this_is_not_string == True + - this_is_also_string == 'no' + - this_is_another_string == 'no' + - this_is_more_strings == 'no' + + - ansible.builtin.set_fact: + this_is_string_fqcn: "yes" + this_is_not_string_fqcn: yes + this_is_also_string_fqcn: "{{ string_var }}" + this_is_another_string_fqcn: !!str "{% set thing = '' + string_var + '' %}{{ thing }}" + this_is_more_strings_fqcn: '{{ string_var + "" }}' + + - assert: + that: + - this_is_string_fqcn == 'yes' + - this_is_not_string_fqcn == True + - this_is_also_string_fqcn == 'no' + - this_is_another_string_fqcn == 'no' + - this_is_more_strings_fqcn == 'no' -- cgit v1.2.3