Hello everyone.
Block scalars are described here <https://yaml-multiline.info/>.

The goal is to be improve the readability of the following block scalar 
example and obtain the intended value for the variable: 
```
- set_fact:
        variable: "{% if condition_1 is true %}{% if condition_2 is true 
%}'value'{% else %}'another value'{% endif %}{% else %}{{ another_variable 
}}{% endif %}"
```
I unsuccessfully tried:
```
- set_fact:
        variable: >-
                "{% if condition_1 is true %}
                        {% if condition_2 is true %}
                                'value'
                        {% else %}
                                'another value'
                        {% endif %}
                {% else %}
                        {{ another_variable }}
                {% endif %}"
```
Unfortunately, some spaces are added in the variable set value and there 
does not seem to be a way to completely "prune" them.

Am I missing something?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1b2e9cf5-923a-4891-878f-7d364573e2aan%40googlegroups.com.

Reply via email to