Very clear, thank you!

On Tuesday, May 30, 2017 at 9:02:44 AM UTC+2, Kai Stian Olstad wrote:
>
> On 29.05.2017 16:26, Listing wrote: 
> > Hi Kai, 
> > 
> > Thank you for your reply. But what is the difference then between 
> > regexp 
> > and insertafter etc? Is regexp always being replaced? Or what is 
> > exactly 
> > the logic? 
>
> regexp: and insertafter: is separate features in lineinfile. 
>
> When lineinfile find the regexp in regexp: it replaces this line with 
> the string in line: 
> If it can't find the regexp in regexp: the sting in line: is append to 
> end of file(EOF). 
>
> When lineinfile find the regexp in insertafter: it add the string in 
> line: after this line, if it's not already exist. 
> If it can't find the regexp in insertafter: the string in line: is 
> append to end of file(EOF). 
>
> These two feature is not meant to be combine in one task, but used in 
> separate tasks. 
>
> -- 
> Kai Stian Olstad 
>

-- 
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/5e339e8d-803c-4661-bd2a-b2c7954bf8bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to