sig-ansible / tomcat

Tomcat Role
2 stars 0 forks source link

SIG's Parameterized Tomcat Role

Install and configure Apache Tomcat.

Requirements

Role Variables

JAR Download Objects

Extra Attribute Objects

JNDI Resource Link Objects

Example:

      tomcat_resource_links:
        - name: jdbc/bannerDataSource
        - global_name: jdbc/bannerDataSource

JNDI Resource Objects

Example:

      tomcat_resources:
        - name: jdbc/bannerDataSource
          attrs:
            auth: Container
            type: javax.sql.DataSource
            url: "{{ banner_jdbc_url }}"
            username: banproxy
            password: "{{ banproxy_pw }}"
            driverClassName: oracle.jdbc.OracleDriver
            initialSize: 25
            maxIdle: 10
            maxTotal: 400
            maxWaitMillis: 30000
            minIdle: 10
            timeBetweenEvictionRunsMillis: 1800000
            testOnBorrow: true
            testWhileIdle: true
            accessToUnderlyingConnectionAllowed: true
            validationQuery: select * from dual

Tomcat User Objects

Dependencies

This role has no required dependencies. It will, however, create "about" info if the sig-ansible.about role is enabled.

Example Playbook

  - role: sig-ansible.tomcat
    vars:
      stage_dir: /tmp
      tomcat_self_signed: yes
      tomcat_base: /u01/app
      tomcat_memory_args: "-Xms2048m -Xmx6g -XX:MaxPermSize=2048m -Doracle.jdbc.autoCommitSpecCompliant=false"
      tomcat_catalina_extra_opts: "-Dbanner.logging.dir=/u01/app/logs"
      tomcat_download_jars:
        - url: https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/19.3.0.0/ojdbc8-19.3.0.0.jar
          checksum: 'sha256:a66d27a14f3adee484427cc4de008af85a5c3e78e2e3285a4dba1277332978a5'
          filename: ojdbc8.jar
        - url: https://repo1.maven.org/maven2/com/oracle/database/xml/xdb/19.3.0.0/xdb-19.3.0.0.jar
          checksum: 'sha256:a3f0545da9651359f05e6538886679f546632f63d409bb7247a0e2c8ae07d078'
          filename: xdb.jar
        - url: https://repo1.maven.org/maven2/com/oracle/database/jdbc/ucp/19.3.0.0/ucp-19.3.0.0.jar
          checksum: 'sha256:23d8debe40a764df74d5eda7e8c1ce9b2c190a34f739ca4d751eaa94114d31cc'

      tomcat_resources:
        - name: jdbc/bannerDataSource
          attrs:
            auth: Container
            type: javax.sql.DataSource
            url: "{{ banner_jdbc_url }}"
            username: banproxy
            password: "{{ banproxy_pw }}"
            driverClassName: oracle.jdbc.OracleDriver
            initialSize: 25
            maxIdle: 10
            maxTotal: 400
            maxWaitMillis: 30000
            minIdle: 10
            timeBetweenEvictionRunsMillis: 1800000
            testOnBorrow: true
            testWhileIdle: true
            accessToUnderlyingConnectionAllowed: true
            validationQuery: select * from dual
            validationQueryTimeout: 300

        - name: jdbc/bannerSsbDataSource
          attrs:
            auth: Container
            type: javax.sql.DataSource
            url: "{{ banner_jdbc_url }}"
            username: ban_ss_user
            password: "{{ ban_ss_user_pw }}"
            driverClassName: oracle.jdbc.OracleDriver
            initialSize: 25
            maxIdle: 10
            maxTotal: 400
            maxWaitMillis: 30000
            minIdle: 10
            timeBetweenEvictionRunsMillis: 1800000
            testOnBorrow: true
            testWhileIdle: true
            accessToUnderlyingConnectionAllowed: true
            validationQuery: select * from dual
            validationQueryTimeout: 300

      tomcat_resource_links:
        - name: jdbc/bannerDataSource
          global_name: jdbc/bannerDataSource
        - name: jdbc/bannerSsbDataSource
          global_name: jdbc/bannerSsbDataSource

License

Copyright 2021 Strata Information Group

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Author Information