I am running this Ansible playbook:
- name: Set String
set_fact:
string: item
loop: "{{some_var|filter()}}"
register: output
- name : Create a File
copy:
content: "{{string}}"
dest: Path/test.txt
some_var is a JSON that comes from a previous task.
The variable item from the loop (executed only one time) contains this:
'test test\ntest test'
So test.txt file contains this:
test test\ntest test
I would like to get this content in the test.txt file:
test test
test test
I believe I should modify the value that the filter returns. I don't know how. Thanks