Git Product home page Git Product logo

ansible-role-tomcat's People

Contributors

inghamn avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-role-tomcat's Issues

Tomcat does not have permission to write to data directories

We set up a consistent place on the hard drive for all our webapps to write data. Rather than each application playbook dealing with granting ReadWrite permission to Tomcat in systemd, we should grant Tomcat permission to the base data directory. Then, all the web applications we install on that server will be able to write data.

Update to support RedHat distros

We are starting to want to run CentOS on servers. We need to update our Ansible roles to work with RPM based distros as well as DEB.

Variables for tomcat

Playbooks need to know some things about the Tomcat install in order to deploy applications.

We need to declare a variable for the webapps path. Not only because people put it in different places; but also because web application playbooks need to know where to put their WAR files.

We need to declare a few variables for Tomcat in the role. These could still be overridden in the group_vars; but keep in mind, we're using the distro version of Tomcat. So changing directory paths or the tomcat user require quite a bit of custom code to alter Tomcat's configuration files. It's probably best just to use the defaults from Ubuntu.

Handle default webapps location for Ubuntu

For several years we've been changing the default location to /srv/webapps. However, it requires some complicated XML and ini file configuration changes, which are hard to do in Ansible (or docker).

We should just start using the default location set by Ubuntu
/var/lib/tomcatX/webapps

We still need to declare {{ tomcat_webapps }} as a variable, so application playbooks know where to install themselves.

Update apt-get install commands to new Ansible syntax

The old way of doing apt with-items is deprecated. The new way is to declare a variable for all the package names.

New style for apt-get install

- name: "Install Dependencies"
  apt:
    name: "{{ packages }}"
    state: present
  vars:
    packages:
      - "postgis"

Old, deprecated style

- name: "Install Dependencies"
  apt:
    name: "{{ item }}"
    state: present
  with_items:
    - "postgis"

Tomcat 9 on Ubuntu 20.04

Ubuntu 14.xx, 16.xx, and 18.xx all used Tomcat 8. This is hard coded in the ansible role. It should not have been. Now that Ubuntu 20.04 uses Tomcat 9, we have to rewrite the ansible role.

We tackled this problem in the Postgres role with distribution vars.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.