how to comment out or remove the characters (<!-- -->) in the tomcat web.xml file using ansible and also a simple playbbok to add the tomcat filters to web.xml file

14 views
Skip to first unread message

Veeresh Reddy

unread,
Dec 15, 2017, 2:07:41 PM12/15/17
to Ansible Project
how to comment out or remove the characters (<!-- -->) in the tomcat web.xml file using ansible and also a simple playbbok to add the tomcat filters to web.xml file.please help me

Dick Visser

unread,
Dec 19, 2017, 7:44:41 AM12/19/17
to ansible...@googlegroups.com
You could use a regex to strip comments, but that's going to be fragile at best.
Might be better off by processing it with a real XML parser.
Take a look at the new xml module:
http://docs.ansible.com/ansible/latest/xml_module.html
You might be able to use that to add your tomcat filters.

Dick
> --
> 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 ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/66b39bb1-4ffd-4fe2-92ea-d548b7183b6d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Dick Visser
GÉANT

Want to join us? We're hiring: https://www.geant.org/jobs
Reply all
Reply to author
Forward
0 new messages