cat1: cool
cat2: notsocool
test: |
This is multiline on yaml
The newlines should be respected
but they are not
is it a bug?
But got:
Expected:
cat1: cool
cat2: notsocool
test: |-
This is multiline on yaml
The newlines should be respected
but they are not
is it a bug?
The subtle difference is that we are adding the "-" to the multiline for some reason which we should not do as it may change what is expected from the output.
Sure this is a minor thing as it only stripes the last line, but something to take into account. We dont want to change the output for no good reason :D
If you do the other way, having the multiline in the template instead of the overrides, it still doesn't output the correct multiline.
Given the following overrides:
test_overrides:
cat1: cool
cat2: notsocool
With the following template:
---
test: |
This is multiline on yaml
The newlines should be respected
but they are not
is it a bug?
And the following task:
- name: "test multiline merge" overrides: "{{ test_overrides }}"
config_template:
src: "test.j2"
dest: "test.yaml"
config_
config_type: yaml
delegate_to: localhost
Expected:
cat1: cool
cat2: notsocool
test: |
This is multiline on yaml
The newlines should be respected
but they are not
is it a bug?
But got:
Expected:
cat1: cool
cat2: notsocool
test: |-
This is multiline on yaml
The newlines should be respected
but they are not
is it a bug?
The subtle difference is that we are adding the "-" to the multiline for some reason which we should not do as it may change what is expected from the output.
Sure this is a minor thing as it only stripes the last line, but something to take into account. We dont want to change the output for no good reason :D