Home > Enterprise >  How to edit tomcat server.xml in multiple folders using andible
How to edit tomcat server.xml in multiple folders using andible

Time:09-30

There are total 4 tomcat folders (tomcat_1...tomcat_4)

How to edit /tomcat_1...4/conf/server.xml

<Server port="{{change_here}}" shutdown="SHUTDOWN">

CodePudding user response:

There are several solutions.

You can make your server.xml a template and use Template module. But if you just want to replace one value inside a big file, this may be an overkill.

So you can try using one of the following Ansible Modules

This module will replace all instances of a pattern within a file.

A CRUD-like interface to managing bits of XML files

There are several examples that may be useful for your use case.

  • Related