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,
Le vendredi 28 juin 2019 14:39:39 UTC+2, Punit Jain a écrit :
>
> 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] <javascript:>>
> 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] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> 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/7a73b356-dce7-435c-8b8b-e08c9b29b877%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.