Fix all ansible-lint violations (109 → 0 failures).

- handlers/main.yml: convert free-form service calls to ansible.builtin.service with dict syntax; capitalize handler names to satisfy name[casing] (Tomcat restart, Enable tomcat, Disable tomcat, Tomcat letsencrypt copy*).
- tasks/main.yml: add FQCN (ansible.builtin.import_tasks) and name: to every import statement, fixing fqcn[action-core] and name[missing].
- tasks/access_log.yml, tomcat-admin.yml, tomcat-jmx.yml, tomcat-log4j-logging.yml, tomcat-logger-logging.yml, not_pgsql_jdbc.yml, pgsql_jdbc.yml: convert all free-form module calls to FQCN + dict syntax.
- tasks/tomcat-javamelody.yml: use community.general.maven_artifact with dict syntax; fix block indentation; split long lines.
- tasks/tomcat-pkgs.yml, tomcat-certs.yml: rename notify references to 'Tomcat restart' to match the renamed handler.
- meta/main.yml: quote min_ansible_version to fix schema[meta]; add role_name/namespace; remove trailing blank line.
- tests/test.yml: add play name; fix role reference; add trailing newline.
- vars/main.yml: fix stale comment; add trailing newline.
- defaults/main.yml: use >- block scalar for tomcat_proxy_opts andtomcat_catalina_shared_loader_path to fix yaml[line-length].
This commit is contained in:
Andrea Dell'Amico 2026-03-06 18:52:36 +01:00
parent 694b91e00a
commit 5e26279d0a
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
17 changed files with 249 additions and 131 deletions

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
# ---> Ansible
*.retry
.vscode/settings.json
.vscode/
.claude/

View File

@ -42,7 +42,10 @@ tomcat_proxy_http_host: 'localhost'
tomcat_proxy_http_port: '3128'
tomcat_proxy_https_host: '{{ tomcat_proxy_http_host }}'
tomcat_proxy_https_port: '{{ tomcat_proxy_http_port }}'
tomcat_proxy_opts: "-DproxySet=true -Dhttp.proxyHost={{ tomcat_proxy_http_host }} -Dhttp.proxyPort={{ tomcat_proxy_http_port }} -Dhttps.proxyHost={{ tomcat_proxy_https_host }} -Dhttps.proxyPort={{ tomcat_proxy_https_port }}"
tomcat_proxy_opts: >-
-DproxySet=true
-Dhttp.proxyHost={{ tomcat_proxy_http_host }} -Dhttp.proxyPort={{ tomcat_proxy_http_port }}
-Dhttps.proxyHost={{ tomcat_proxy_https_host }} -Dhttps.proxyPort={{ tomcat_proxy_https_port }}
tomcat_other_java_opts: ""
tomcat_install_server_xml: true
tomcat_install_default_conf: true
@ -77,7 +80,8 @@ tomcat_work_dir: '{{ tomcat_catalina_base_dir }}/work'
tomcat_common_classes_dir: '{{ tomcat_catalina_base_dir }}/common/classes'
tomcat_tmp_dir: '{{ tomcat_catalina_base_dir }}/tmp/tomcat'
tomcat_enable_catalina_shared_loader: true
tomcat_catalina_shared_loader_path: '${catalina.home}/shared/classes,${catalina.home}/shared/*.jar,${catalina.base}/shared/classes,${catalina.base}/shared/*.jar'
tomcat_catalina_shared_loader_path: >-
${catalina.home}/shared/classes,${catalina.home}/shared/*.jar,${catalina.base}/shared/classes,${catalina.base}/shared/*.jar
# JMX and debugging

View File

@ -1,22 +1,31 @@
---
- name: tomcat restart
service: name='tomcat{{ tomcat_version }}' state=restarted sleep=20
- name: Tomcat restart
ansible.builtin.service:
name: 'tomcat{{ tomcat_version }}'
state: restarted
sleep: 20
when: tomcat_service_enabled
- name: enable tomcat
service: name='tomcat{{ tomcat_version }}' state=started enabled=yes
- name: Enable tomcat
ansible.builtin.service:
name: 'tomcat{{ tomcat_version }}'
state: started
enabled: true
when: tomcat_service_enabled
- name: disable tomcat
service: name='tomcat{{ tomcat_version }}' state=started enabled=no
- name: Disable tomcat
ansible.builtin.service:
name: 'tomcat{{ tomcat_version }}'
state: started
enabled: false
when: not tomcat_service_enabled
# Both handlers below listen for 'letsencrypt cert renewed', which can be notified
# by the letsencrypt-acme-sh-client role or any other task in the same playbook run.
# ansible.builtin.copy compares checksums and only marks changed (and thus only
# triggers 'tomcat restart') when the file content has actually changed.
# triggers 'Tomcat restart') when the file content has actually changed.
- name: tomcat letsencrypt copy fullchain
- name: Tomcat letsencrypt copy fullchain
ansible.builtin.copy:
src: "{{ tomcat_ssl_letsencrypt_cert_dir }}/{{ tomcat_ssl_letsencrypt_fullchain_src_filename }}"
dest: "{{ tomcat_ssl_cert_dir }}/{{ tomcat_ssl_fullchain_filename }}"
@ -28,9 +37,9 @@
when:
- tomcat_ssl_enabled | bool
- tomcat_ssl_cert_source == 'letsencrypt'
notify: tomcat restart
notify: Tomcat restart
- name: tomcat letsencrypt copy key
- name: Tomcat letsencrypt copy key
ansible.builtin.copy:
src: "{{ tomcat_ssl_letsencrypt_cert_dir }}/{{ tomcat_ssl_letsencrypt_key_src_filename }}"
dest: "{{ tomcat_ssl_cert_dir }}/{{ tomcat_ssl_key_filename }}"
@ -42,4 +51,4 @@
when:
- tomcat_ssl_enabled | bool
- tomcat_ssl_cert_source == 'letsencrypt'
notify: tomcat restart
notify: Tomcat restart

View File

@ -1,13 +1,15 @@
galaxy_info:
author: Andrea Dell'Amico
description: Systems Architect
namespace: isti_cnr
role_name: tomcat
description: Install and configure Apache Tomcat
company: ISTI-CNR
issue_tracker_url: https://redmine-s2i2s.isti.cnr.it/projects/provisioning
license: EUPL 1.2+
min_ansible_version: 2.8
min_ansible_version: '2.9'
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
@ -16,6 +18,9 @@ galaxy_info:
- name: Ubuntu
versions:
- bionic
- focal
- jammy
- noble
galaxy_tags:
- tomcat
@ -25,4 +30,3 @@ dependencies:
version: master
name: openjdk
state: latest

View File

@ -1,6 +1,10 @@
---
- name: Install a logrotate entry for the access log file
template: src=tomcat_access.logrotate.j2 dest=/etc/logrotate.d/tomcat_access owner=root group=root mode=0644
- name: access_log | Install a logrotate entry for the access log file
ansible.builtin.template:
src: tomcat_access.logrotate.j2
dest: /etc/logrotate.d/tomcat_access
owner: root
group: root
mode: '0644'
when: tomcat_access_log_enabled
tags: tomcat

View File

@ -1,26 +1,45 @@
---
- import_tasks: tomcat-pkgs.yml
- import_tasks: tomcat-javamelody.yml
- import_tasks: tomcat-admin.yml
- name: Import package setup tasks
ansible.builtin.import_tasks: tomcat-pkgs.yml
- name: Import javamelody tasks
ansible.builtin.import_tasks: tomcat-javamelody.yml
- name: Import admin tasks
ansible.builtin.import_tasks: tomcat-admin.yml
when: tomcat_install_admin
- import_tasks: tomcat-jmx.yml
- name: Import JMX tasks
ansible.builtin.import_tasks: tomcat-jmx.yml
when:
- tomcat_jmx_enabled
- tomcat_jmx_auth_enabled
tags: ['tomcat', 'jmx']
- import_tasks: tomcat-log4j-logging.yml
- name: Import log4j logging tasks
ansible.builtin.import_tasks: tomcat-log4j-logging.yml
when:
- tomcat_use_log4j
- tomcat_version is version_compare('7', '<=')
tags: ['tomcat', 'tomcat_log4j']
- import_tasks: tomcat-logger-logging.yml
- name: Import logger logging tasks
ansible.builtin.import_tasks: tomcat-logger-logging.yml
when: not tomcat_use_log4j or tomcat_version is version_compare('7', '>')
- import_tasks: access_log.yml
- name: Import access log tasks
ansible.builtin.import_tasks: access_log.yml
when: tomcat_access_log_enabled
- import_tasks: pgsql_jdbc.yml
- name: Import PostgreSQL JDBC tasks
ansible.builtin.import_tasks: pgsql_jdbc.yml
when: tomcat_install_pg_jdbc
- import_tasks: not_pgsql_jdbc.yml
- name: Import non-PostgreSQL JDBC tasks
ansible.builtin.import_tasks: not_pgsql_jdbc.yml
when: not tomcat_install_pg_jdbc
- import_tasks: tomcat-certs.yml
- name: Import SSL certificate tasks
ansible.builtin.import_tasks: tomcat-certs.yml
when: tomcat_ssl_enabled | bool
tags: ['tomcat', 'tomcat_ssl']

View File

@ -1,9 +1,10 @@
---
- name: Do not load the postgresql jdbc driver on tomcat if not needed
file: dest={{ tomcat_catalina_home_dir }}/lib/{{ item }} state=absent
- name: not_pgsql_jdbc | Do not load the postgresql jdbc driver on tomcat if not needed
ansible.builtin.file:
dest: '{{ tomcat_catalina_home_dir }}/lib/{{ item }}'
state: absent
with_items:
- postgresql-jdbc4.jar
when: not tomcat_install_pg_jdbc
notify: tomcat restart
notify: Tomcat restart
tags: tomcat

View File

@ -1,16 +1,19 @@
---
# Postgresql JDBC
- name: Install the jdbc package if needed
apt: pkg=libpostgresql-jdbc-java state=present
# PostgreSQL JDBC
- name: pgsql_jdbc | Install the jdbc package if needed
ansible.builtin.apt:
pkg: libpostgresql-jdbc-java
state: present
when: tomcat_install_pg_jdbc
tags: [ 'tomcat', 'tomcat_jdbc' ]
tags: ['tomcat', 'tomcat_jdbc']
- name: Configure tomcat to use the global postgresql jdbc driver
file: src=/usr/share/java/{{ item }} dest=/usr/share/tomcat{{ tomcat_version }}/lib/{{ item }} state=link
- name: pgsql_jdbc | Configure tomcat to use the global postgresql jdbc driver
ansible.builtin.file:
src: '/usr/share/java/{{ item }}'
dest: '/usr/share/tomcat{{ tomcat_version }}/lib/{{ item }}'
state: link
with_items:
- postgresql-jdbc4.jar
when: tomcat_install_pg_jdbc
notify:
tomcat restart
tags: [ 'tomcat', 'tomcat_jdbc' ]
notify: Tomcat restart
tags: ['tomcat', 'tomcat_jdbc']

View File

@ -1,10 +1,16 @@
---
- name: Install the tomcat console management package
apt: pkg=tomcat{{ tomcat_version }}-admin state={{ tomcat_pkg_state }}
- name: tomcat-admin | Install the tomcat console management package
ansible.builtin.apt:
pkg: 'tomcat{{ tomcat_version }}-admin'
state: '{{ tomcat_pkg_state }}'
tags: tomcat
- name: Install the tomcat users file
template: src=tomcat-users.xml.j2 dest={{ tomcat_conf_dir }}/tomcat-users.xml owner=root group={{ tomcat_user }} mode=0640
notify: tomcat restart
- name: tomcat-admin | Install the tomcat users file
ansible.builtin.template:
src: tomcat-users.xml.j2
dest: '{{ tomcat_conf_dir }}/tomcat-users.xml'
owner: root
group: '{{ tomcat_user }}'
mode: '0640'
notify: Tomcat restart
tags: tomcat

View File

@ -17,7 +17,7 @@
mode: "0640"
remote_src: true
when: tomcat_ssl_cert_source == 'letsencrypt'
notify: tomcat restart
notify: Tomcat restart
tags: ['tomcat', 'tomcat_ssl']
- name: tomcat-certs | Copy the private key from the letsencrypt install directory to a tomcat-readable location
@ -29,7 +29,7 @@
mode: "0640"
remote_src: true
when: tomcat_ssl_cert_source == 'letsencrypt'
notify: tomcat restart
notify: Tomcat restart
tags: ['tomcat', 'tomcat_ssl']
- name: tomcat-certs | Copy the fullchain certificate from the mkcert directory
@ -41,7 +41,7 @@
mode: "0640"
remote_src: true
when: tomcat_ssl_cert_source == 'mkcert'
notify: tomcat restart
notify: Tomcat restart
tags: ['tomcat', 'tomcat_ssl']
- name: tomcat-certs | Copy the private key from mkcert to a tomcat-readable location
@ -53,7 +53,7 @@
mode: "0640"
remote_src: true
when: tomcat_ssl_cert_source == 'mkcert'
notify: tomcat restart
notify: Tomcat restart
tags: ['tomcat', 'tomcat_ssl']
- name: tomcat-certs | Ensure the letsencrypt hooks directory exists

View File

@ -1,28 +1,55 @@
---
- name: Manage the javamelody installation
block:
- name: Install the javamelody dependency jar into the Java shared libs directory
maven_artifact: artifact_id=jrobin version=latest group_id=org.jrobin extension=jar dest=/usr/share/java/jrobin.jar verify_checksum=always mode=0644 owner=root group=root repository_url=https://repo1.maven.org/maven2
- name: Install the javamelody-core jar into the Java shared libs directory
maven_artifact: artifact_id=javamelody-core version={{ tomcat_javamelody_version }} group_id=net.bull.javamelody extension=jar dest=/usr/share/java/javamelody-core.jar verify_checksum=always mode=0644 owner=root group=root repository_url=https://repo1.maven.org/maven2
- name: Create a link to the the javamelody jar and its dependencies if the javamelody support is enabled
file: src=../../java/{{ item }} dest={{ tomcat_catalina_home_dir }}/lib/{{ item }} state=link owner=root group=root mode=0644
with_items:
- javamelody-core.jar
- jrobin.jar
- name: tomcat-javamelody | Manage the javamelody installation
when:
- tomcat_javamelody
- ansible_distribution == "Ubuntu"
- ansible_distribution_version is version_compare('16.04', '>=')
tags: [ 'tomcat', 'tomcat_javamelody', 'tomcat_conf' ]
tags: ['tomcat', 'tomcat_javamelody', 'tomcat_conf']
block:
- name: tomcat-javamelody | Install the javamelody dependency jar into the Java shared libs directory
community.general.maven_artifact:
artifact_id: jrobin
version: latest
group_id: org.jrobin
extension: jar
dest: /usr/share/java/jrobin.jar
verify_checksum: always
mode: '0644'
owner: root
group: root
repository_url: https://repo1.maven.org/maven2
- name: Remove the javamelody jar and its dependencies if the javamelody support is disabled
file: dest={{ tomcat_catalina_home_dir }}/lib/{{ item }} state=absent
- name: tomcat-javamelody | Install the javamelody-core jar into the Java shared libs directory
community.general.maven_artifact:
artifact_id: javamelody-core
version: '{{ tomcat_javamelody_version }}'
group_id: net.bull.javamelody
extension: jar
dest: /usr/share/java/javamelody-core.jar
verify_checksum: always
mode: '0644'
owner: root
group: root
repository_url: https://repo1.maven.org/maven2
- name: tomcat-javamelody | Create a link to the javamelody jar and its dependencies
ansible.builtin.file:
src: '../../java/{{ item }}'
dest: '{{ tomcat_catalina_home_dir }}/lib/{{ item }}'
state: link
owner: root
group: root
mode: '0644'
with_items:
- javamelody-core.jar
- jrobin.jar
- name: tomcat-javamelody | Remove the javamelody jar and its dependencies if javamelody support is disabled
ansible.builtin.file:
dest: '{{ tomcat_catalina_home_dir }}/lib/{{ item }}'
state: absent
with_items:
- javamelody-core.jar
- jrobin.jar
when: not tomcat_javamelody
tags: [ 'tomcat', 'tomcat_javamelody', 'tomcat_conf' ]
tags: ['tomcat', 'tomcat_javamelody', 'tomcat_conf']

View File

@ -1,16 +1,24 @@
---
- name: Distribute the jmx authorization file
template: src=jmxremote.passwd.j2 dest={{ tomcat_jmx_auth_dir }}/jmxremote.passwd owner={{ tomcat_user }} mode=0600
- name: tomcat-jmx | Distribute the jmx authorization file
ansible.builtin.template:
src: jmxremote.passwd.j2
dest: '{{ tomcat_jmx_auth_dir }}/jmxremote.passwd'
owner: '{{ tomcat_user }}'
mode: '0600'
when:
- tomcat_jmx_enabled
- tomcat_jmx_auth_enabled
notify: tomcat restart
tags: [ 'tomcat', 'jmx' ]
notify: Tomcat restart
tags: ['tomcat', 'jmx']
- name: Distribute the jmx role file
copy: src=jmxremote.access dest={{ tomcat_jmx_auth_dir }}/jmxremote.access owner=root mode=0644
- name: tomcat-jmx | Distribute the jmx role file
ansible.builtin.copy:
src: jmxremote.access
dest: '{{ tomcat_jmx_auth_dir }}/jmxremote.access'
owner: root
mode: '0644'
when:
- tomcat_jmx_enabled
- tomcat_jmx_auth_enabled
notify: tomcat restart
tags: [ 'tomcat', 'jmx' ]
notify: Tomcat restart
tags: ['tomcat', 'jmx']

View File

@ -1,41 +1,61 @@
---
# Manage tomcat internal logs with log4j
- name: Install log4j
apt: pkg=liblog4j1.2-java state={{ tomcat_pkg_state }}
notify: tomcat restart
tags: [ 'tomcat', 'tomcat_log4j' ]
- name: tomcat-log4j-logging | Install log4j
ansible.builtin.apt:
pkg: liblog4j1.2-java
state: '{{ tomcat_pkg_state }}'
notify: Tomcat restart
tags: ['tomcat', 'tomcat_log4j']
- name: Install tomcat-juli-adapters
copy: src=tomcat{{ tomcat_version }}-juli-adapters.jar dest=/usr/share/java/tomcat-juli-adapters.jar
tags: [ 'tomcat', 'tomcat_log4j' ]
- name: tomcat-log4j-logging | Install tomcat-juli-adapters
ansible.builtin.copy:
src: 'tomcat{{ tomcat_version }}-juli-adapters.jar'
dest: /usr/share/java/tomcat-juli-adapters.jar
mode: '0644'
tags: ['tomcat', 'tomcat_log4j']
- name: Install tomcat-juli
copy: src=tomcat{{ tomcat_version }}-juli-log4j.jar dest=/usr/share/java/tomcat-juli-log4j.jar
tags: [ 'tomcat', 'tomcat_log4j' ]
- name: tomcat-log4j-logging | Install tomcat-juli
ansible.builtin.copy:
src: 'tomcat{{ tomcat_version }}-juli-log4j.jar'
dest: /usr/share/java/tomcat-juli-log4j.jar
mode: '0644'
tags: ['tomcat', 'tomcat_log4j']
- name: Configure tomcat to use the log4j system library
file: src=/usr/share/java/{{ item }} dest={{ tomcat_catalina_home_dir }}/lib/{{ item }} state=link
- name: tomcat-log4j-logging | Configure tomcat to use the log4j system library
ansible.builtin.file:
src: '/usr/share/java/{{ item }}'
dest: '{{ tomcat_catalina_home_dir }}/lib/{{ item }}'
state: link
with_items:
- log4j-1.2.jar
- tomcat-juli-adapters.jar
notify: tomcat restart
tags: [ 'tomcat', 'tomcat_log4j' ]
notify: Tomcat restart
tags: ['tomcat', 'tomcat_log4j']
- name: Configure tomcat to use the log4j version of the juli library
file: src=/usr/share/java/{{ item }} dest={{ tomcat_catalina_home_dir }}/bin/tomcat-juli.jar state=link
- name: tomcat-log4j-logging | Configure tomcat to use the log4j version of the juli library
ansible.builtin.file:
src: '/usr/share/java/{{ item }}'
dest: '{{ tomcat_catalina_home_dir }}/bin/tomcat-juli.jar'
state: link
with_items:
- tomcat-juli-log4j.jar
notify: tomcat restart
tags: [ 'tomcat', 'tomcat_log4j' ]
notify: Tomcat restart
tags: ['tomcat', 'tomcat_log4j']
- name: Install log4j.properties
template: src=log4j.properties.j2 dest={{ tomcat_catalina_home_dir }}/lib/log4j.properties mode=0644 owner=root group=root
- name: tomcat-log4j-logging | Install log4j.properties
ansible.builtin.template:
src: log4j.properties.j2
dest: '{{ tomcat_catalina_home_dir }}/lib/log4j.properties'
owner: root
group: root
mode: '0644'
when: tomcat_install_the_log4j_properties
notify: tomcat restart
tags: [ 'tomcat', 'tomcat_log4j' ]
- name: Remove logging.properties
file: dest=/etc/tomcat{{ tomcat_version }}/logging.properties state=absent
notify: tomcat restart
tags: [ 'tomcat', 'tomcat_log4j' ]
notify: Tomcat restart
tags: ['tomcat', 'tomcat_log4j']
- name: tomcat-log4j-logging | Remove logging.properties
ansible.builtin.file:
dest: '/etc/tomcat{{ tomcat_version }}/logging.properties'
state: absent
notify: Tomcat restart
tags: ['tomcat', 'tomcat_log4j']

View File

@ -1,26 +1,37 @@
---
- name: Remove the system log4j library from the tomcat libdir
file: dest={{ tomcat_catalina_home_dir }}/lib/{{ item }} state=absent
- name: tomcat-logger-logging | Remove the system log4j library from the tomcat libdir
ansible.builtin.file:
dest: '{{ tomcat_catalina_home_dir }}/lib/{{ item }}'
state: absent
with_items:
- log4j-1.2.jar
- tomcat-juli-adapters.jar
notify: tomcat restart
notify: Tomcat restart
tags: tomcat
- name: Configure tomcat to use the standard version of the juli library
file: src=/usr/share/java/{{ item }} dest={{ tomcat_catalina_home_dir }}/bin/{{ item }} state=link
- name: tomcat-logger-logging | Configure tomcat to use the standard version of the juli library
ansible.builtin.file:
src: '/usr/share/java/{{ item }}'
dest: '{{ tomcat_catalina_home_dir }}/bin/{{ item }}'
state: link
with_items:
- 'tomcat{{ tomcat_version }}-juli.jar'
notify: tomcat restart
notify: Tomcat restart
tags: tomcat
- name: Remove the system log4j.properties
file: dest={{ tomcat_catalina_home_dir }}/lib/log4j.properties state=absent
notify: tomcat restart
- name: tomcat-logger-logging | Remove the system log4j.properties
ansible.builtin.file:
dest: '{{ tomcat_catalina_home_dir }}/lib/log4j.properties'
state: absent
notify: Tomcat restart
tags: tomcat
- name: Install logging.properties
copy: src=logging.properties dest=/etc/tomcat{{ tomcat_version }}/logging.properties owner=root group=root mode=0644
notify: tomcat restart
- name: tomcat-logger-logging | Install logging.properties
ansible.builtin.copy:
src: logging.properties
dest: '/etc/tomcat{{ tomcat_version }}/logging.properties'
owner: root
group: root
mode: '0644'
notify: Tomcat restart
tags: tomcat

View File

@ -56,7 +56,7 @@
owner: "{{ tomcat_user }}"
group: "{{ tomcat_user }}"
mode: "0750"
notify: tomcat restart
notify: Tomcat restart
tags: tomcat
- name: tomcat-pkgs | Create the catalina temp directory, if different from the default
@ -67,7 +67,7 @@
group: "{{ tomcat_user }}"
mode: "0750"
when: catalina_tmp_directory is defined
notify: tomcat restart
notify: Tomcat restart
tags: tomcat
- name: tomcat-pkgs | Configure tomcat defaults
@ -78,7 +78,7 @@
group: "{{ tomcat_user }}"
mode: "0640"
when: tomcat_install_default_conf | bool
notify: tomcat restart
notify: Tomcat restart
tags: ['tomcat', 'tomcat_default', 'tomcat_conf']
- name: tomcat-pkgs | Configure tomcat server.xml
@ -89,7 +89,7 @@
group: "{{ tomcat_user }}"
mode: "0640"
when: tomcat_install_server_xml | bool
notify: tomcat restart
notify: Tomcat restart
tags: ['tomcat', 'tomcat_serverxml', 'tomcat_conf']
- name: tomcat-pkgs | Configure tomcat web.xml
@ -99,7 +99,7 @@
owner: root
group: "{{ tomcat_user }}"
mode: "0640"
notify: tomcat restart
notify: Tomcat restart
tags: ['tomcat', 'tomcat_serverxml', 'tomcat_conf']
- name: tomcat-pkgs | Print the value of the variable that tell us if we want systemd
@ -114,7 +114,7 @@
owner: root
group: root
mode: "0755"
notify: tomcat restart
notify: Tomcat restart
register: reload_systemd
when:
- tomcat_use_systemd_unit
@ -137,7 +137,7 @@
owner: root
group: root
mode: "0644"
notify: tomcat restart
notify: Tomcat restart
register: reload_systemd
when:
- tomcat_use_systemd_unit
@ -158,7 +158,7 @@
group: "{{ tomcat_user }}"
mode: "0644"
when: tomcat_install_default_conf | bool
notify: tomcat restart
notify: Tomcat restart
tags: ['tomcat', 'tomcat_catalinaprops']
- name: tomcat-pkgs | Create some directories that the package do not creates itself

View File

@ -1,5 +1,6 @@
---
- hosts: localhost
- name: Test tomcat role
hosts: localhost
remote_user: root
roles:
- ansible-role-template
- tomcat

View File

@ -1,2 +1,2 @@
---
# vars file for ansible-role-template
# vars file for ansible-role-tomcat