Hi ,
I am trying to use the xml module to edit the tomcat’s server.xml to add few lines .but it not getting idea as what to provide the xpath. In the below ,want to add few line( like acceptCount=“somecontent”, **maxConnections=“somecontent”,**connectionTimeout=“some content” ) under the .Currently using the blockinfile but thats not the right way of editing it. Could you please help in knowing how to use xml module to implement.
<``Service
name``=``"Catalina"
>
**##to add few lines here using xml module###**
````<Connector` `port
="8080"` `protocol
="HTTP/1.1"
*<br> | *```connectionTimeout
=``“20000”` |
- | - |
*<br> | *```redirectPort
=``“8443”/>` |
- | - |
*<br> | *`<
Connectorport
=
“8009”protocol
=
“AJP/1.3”redirectPort
=
“8443”/` |
- | - |
<``Engine
name``=``"Catalina"
defaultHost``=``"localhost"``>
``
**##to add few more lines here using xml module###**
| |
- | - |
<br> | `<
RealmclassName
=
“org.apache.catalina.realm.LockOutRealm”``>` |
- | - |
<br> | `<
RealmclassName
=
“org.apache.catalina.realm.UserDatabaseRealm”` |
- | - |
<br> | `resourceName
="UserDatabase"
/>` |
- | - |
<br> | `</
Realm``>` |
- | - |
I am using blockinfile as below :
- blockinfile:
path: /etc/tomcat/server.xml
insertafter: ‘’
marker: “# {mark} ANSIBLE MANAGED BLOCK insertion 1”
content: |
acceptCount=“somecontent”
maxConnections=“somecontent”
connectionTimeout=“some content”
Thank you.