add Connector to server.xml file

40 views
Skip to first unread message

shloco

unread,
May 18, 2023, 6:02:09 AM5/18/23
to Ansible Project
Hi Team,

I'm trying to add additional Connector to server.xml file, I try to use XML module so far without no luck. any ideas ?

  community.general.xml:
    path: server.xml
    xpath: /Server/Service
    add_children:
     - Connector:
          port: '8090'
          relaxedPathChars: "[]|"
          .
          .
          .

 <Connector port="8090" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`&quot;&lt;&gt;" maxThreads="250" minSpareThreads="50" />


server.xml

<Server port="8005" shutdown="SHUTDOWN">
    <Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
    <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"/>
    <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
    <Listener        className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
    <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>

    <Service name="Catalina">
        <!--
        

        <Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"
                   maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
                   maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"
                   acceptCount="100" disableUploadTimeout="true" bindOnInit="false"/>

        <!--
         ==============================================================================================================
         HTTP - Proxying Jira via Apache or Nginx over HTTP

         If you're proxying traffic to Jira over HTTP, uncomment the below connector and comment out the others.
         Ensure the proxyName and proxyPort are updated with the appropriate information if necessary as per the docs.

         See the following for more information:

            Apache - https://confluence.atlassian.com/x/4xQLM
            nginx  - https://confluence.atlassian.com/x/DAFmGQ
         ==============================================================================================================
        -->

Atul Nasir

unread,
Aug 20, 2023, 6:03:49 PM8/20/23
to Ansible Project
- name: Add Connector to server.xml
  community.general.xml:
    path: /path/to/server.xml

    xpath: /Server/Service
    add_children:
      - Connector:
          port: '8090'
          relaxedPathChars: "[]|"
          relaxedQueryChars: "[]|{}^\\`&quot;&lt;&gt;"
          maxThreads: '250'
          minSpareThreads: '50'
Reply all
Reply to author
Forward
0 new messages