vantaworks.tomcat

Tomcat Ansible Role

Build Status

This is an Ansible role for installing, configuring, and updating Apache's Tomcat on Linux. It follows the versions found in Tomcat's GitHub repository and downloads Tomcat from official Apache mirrors. If you need an Ansible role that updates Tomcat every time it runs, this is the one for you.

Requirements

You need at least Java 8. Here are two options for that:

  1. geerlingguy.java
  2. ansiblebit.oracle-java

Installation

To install the role directly from GitHub, use:

- name: tomcat
  src: http://github.com/vantaworks/tomcat.git
  scm: git
  version: master

Alternatively, if you want to install it from Ansible Galaxy, use:

- name: tomcat
  src: vantaworks.tomcat
  version: master

Then run this command to install:

ansible-galaxy install -p roles -r requirements.yml -f

For more information on variables and example playbooks, see below.

Role Variables

Here are the available variables with their default values (check defaults/main.yml):

  • Main version to install:
tomcat_major_version: 8
  • Specific minor version to lock to (it's best to leave this blank for the latest):
tomcat_minor_version: 8.5.57
# default is blank
  • Apache mirror to download Tomcat from:
tomcat_mirror: "http://apache.mirrors.hoobly.com"
  • Tomcat service account parameters (optional):
tomcat_user: tomcat
tomcat_group: tomcat

tomcat_user_uid: ""
tomcat_group_gid: ""
# default is blank
  • Name of the system service:
tomcat_service_name: "tomcat"
  • To enable the Tomcat service:
tomcat_service_enabled: True
  • JVM memory allocation percentages:
tomcat_jvm_percentage_xms: 15
tomcat_jvm_percentage_xmx: 55
  • Enable JMX debugging for Tomcat:
tomcat_debug_mode: False

Dependencies

There are no Ansible-Python dependencies. Refer to Requirements for more info.

Example Playbooks

# Install and manage Tomcat 8 (currently 8.5)
- name: Example Install Play 1 - Production
  hosts: tomcat
  vars:
    tomcat_major_version: 8
  roles:
    - vantaworks.tomcat

- name: Example Install Play 2 - Development
  hosts: tomcat_dev
  vars:
    tomcat_major_version: 9
    tomcat_permissions_production: False
    tomcat_users:
      - username: "tomcat"
        password: "lamepassword"
        roles: "tomcat,admin,manager,manager-gui"
      - username: "developer"
        password: "worsepw"
        roles: "tomcat,admin,manager,manager-gui"
  roles:
    - vantaworks.tomcat

- name: Example Uninstall Play
  hosts: tomcat
  vars:
    tomcat_state: "absent"
    tomcat_uninstall_create_backup: True
    tomcat_uninstall_remove_user: True
    tomcat_uninstall_remove_group: True
    tomcat_uninstall_remove_all: True
  roles:
    - vantaworks.tomcat

License

BSD

Informazioni sul progetto

Ansible role to install, configure, and update Apache's Tomcat on Linux

Installa
ansible-galaxy install vantaworks.tomcat
Licenza
Unknown
Download
183
Proprietario
where curiosity leads to solutions