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'}}"
On Fri, 28 Jun 2019 at 13:54, Karther <[email protected]> wrote:
> 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,
>
> --
> 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 post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/b6eb265d-50b6-4cf9-8e5a-41aaafc96514%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/b6eb265d-50b6-4cf9-8e5a-41aaafc96514%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAFXWBQLe-vZ-rHDEy%3DD%3DPsoN85d7cNRMvU2Kju4GvvcOq07h6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.