I'm using chef to manage a tomcat application. In this application, there is a web.xml file that I need to make 1 minor change to. Up until now, I've been using a template for this file, however the authors of the application like to change the contents of this file with each update, which means I have to change my template on every update. In my mind that defeats the point.
The only thing I care about in the file is this bit near the end:
<!--
<session-config>
<session-timeout>30</session-timeout>
</session-config>
-->
I just need to strip out the comment tags, and insert my own value into the session-timeout tags. I want to keep the rest of the file however the vendor supplies it, maintaining any changes that come with newer versions of the software.
What is the best way to accomplish this?