On Tuesday, 14 November 2017 06.07.32 CET [email protected] wrote:
> Is there a way that we can change the value of few  lines and remove few 
> lines using only one lineinfile module.
> for example using the regexp we find the line  "GSSAPIAuthentication No" 
> and using the line we change line: "GSSAPIAuthentication yes" and few more 
> lines to change regexp:"GSSAPIStrictAcceptorCheck yes " to 
> line: "GSSAPIStrictAcceptorCheck no "

That is what lineinfile do, there are examples in the documentation.


> But i want to remove few line in the same lineinfile like for example   
> "PubkeyAuthentication" line should be removed..

state: absent on lineinfile will make sure the line does not exist.


-- 
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/2552649.Z9lcW2FMtf%40x1.
For more options, visit https://groups.google.com/d/optout.

Reply via email to