Karther
(Karther)
1
Hy all,
I have one file my_file with this content :
myfirstparaphrase
I have this task :
- set_fact:
variable1: “{{ lookup(‘file’, ‘/home/ansible/my_file’) | replace(’ ', ‘\n’) }}”
I want that in the end of my phrase, there is line breack but this task not works …
Someone have idea please community ansible ??! 
Thanks,
Regards,
Are you looking for this . ?
set_fact:
variable1: “{{lookup(‘file’, ‘my_file’) if ‘\n’ in lookup(‘file’, ‘my_file’) else lookup(‘file’, ‘my_file’) + ‘\n’}}”
Karther
(Karther)
3
Hy,
I have try this issue, but +‘\n’ is write at the end of my file and he not play role of “line break” …
I don’t know if do you understand ?? 
Thanks for your answer 
Regards,