Split tomcat-instance in tomcat + tomcat-instance

This commit is contained in:
Victor LABORIE 2017-06-27 14:42:36 +02:00 committed by Jérémy Lecour
parent 08b4b2fa4a
commit c3db08e6db
14 changed files with 64 additions and 18 deletions

View File

@ -5,7 +5,6 @@ Install a Tomcat Instance with an independent Unix user and use of systemd user
## Available variables
**tomcat_instance_name **: Name of Tomcat instance and proprietary user and group (***required***)
**tomcat_instance_root:** Root dir for Tomcat instance (default: /srv/tomcat)
**tomcat_instance_port**: HTTP port for Tomcat instance and uid/gid for Tomcat user and group (default: 8080)
**tomcat_instance_shutdown**: Port for Tomcat shutdown (default: HTTP port + 1)
**tomcat_instance_ram**: Max memory for Tomcat instance (default: 512)

View File

@ -1,4 +1,2 @@
---
tomcat_instance_root: '/srv/tomcat'
tomcat_instance_port: 8080
tomcat_instance_ram: 512

View File

@ -1,3 +1,4 @@
---
galaxy_info:
author: Evolix
description: Configuration of a Tomcat instance.
@ -13,7 +14,5 @@ galaxy_info:
versions:
- jessie
dependencies: []
# List your role dependencies here, one per line.
# Be sure to remove the '[]' above if you add dependencies
# to this list.
dependencies:
- tomcat

View File

@ -1,15 +1,6 @@
---
- include: tomcat.yml
- include: nagios.yml
- include: check.yml
- include: user.yml
- include: systemd.yml
- include: alias.yml
- include: bootstrap.yml

28
tomcat/.kitchen.yml Normal file
View File

@ -0,0 +1,28 @@
---
driver:
name: docker
privileged: true
use_sudo: false
provisioner:
name: ansible_playbook
hosts: test-kitchen
roles_path: ../
ansible_verbose: true
require_ansible_source: false
require_chef_for_busser: false
idempotency_test: true
platforms:
- name: debian
driver_config:
image: evolix/ansible:2.2.1
suites:
- name: default
provisioner:
name: ansible_playbook
playbook: ./tests/test.yml
transport:
max_ssh_sessions: 6

7
tomcat/README.md Normal file
View File

@ -0,0 +1,7 @@
# tomcat
Install a Tomcat depndancies for multiple tomcat instance.
## Available variables
**tomcat_instance_root:** Root dir for Tomcat instance (default: /srv/tomcat)

2
tomcat/defaults/main.yml Normal file
View File

@ -0,0 +1,2 @@
---
tomcat_instance_root: '/srv/tomcat'

19
tomcat/meta/main.yml Normal file
View File

@ -0,0 +1,19 @@
galaxy_info:
author: Evolix
description: Installation of a Tomcat.
issue_tracker_url: https://forge.evolix.org/projects/ansible-roles/issues
license: GPLv2
min_ansible_version: 2.2
platforms:
- name: Debian
versions:
- jessie
dependencies: []
# List your role dependencies here, one per line.
# Be sure to remove the '[]' above if you add dependencies
# to this list.

3
tomcat/tasks/main.yml Normal file
View File

@ -0,0 +1,3 @@
---
- include: packages.yml
- include: nagios.yml

View File

@ -27,6 +27,6 @@
- name: Copy Tomcat instance check
template:
src: templates/check_tomcat_instance.sh.j2
src: check_tomcat_instance.sh.j2
dest: /usr/local/lib/nagios/plugins/check_tomcat_instance.sh
mode: "0755"

View File

@ -18,7 +18,7 @@
- name: Copy systemd unit
copy:
src: 'files/tomcat.service'
src: 'tomcat.service'
dest: "/etc/systemd/user/tomcat.service"
mode: "0755"
notify: systemd reload