Commit Graph

31 Commits

Author SHA1 Message Date
Andrea Dell'Amico 5e26279d0a
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].
2026-03-06 18:52:36 +01:00
Andrea Dell'Amico 694b91e00a
Add SSL/TLS certificate support and improve connector configuration.
- Add tasks/tomcat-certs.yml: copies cert and key from letsencrypt or mkcert
  source directories into a tomcat-readable location, installs the acme.sh
  renewal hook script.
- Add templates/tomcat-letsencrypt-hook.j2: shell hook called by acme.sh on
  renewal; uses cmp to detect changes and restarts tomcat only when needed.
- Add handlers for 'letsencrypt cert renewed': copy fullchain and key then
  notify tomcat restart; triggered via listen from any task in the same play.
- Add HTTPS connector to tomcat-server.xml.j2: Http11NioProtocol with
  SSLHostConfig on Tomcat 9+, Http11AprProtocol with inline attributes on
  Tomcat 7/8; both connectors share the named Executor thread pool.
- Improve HTTP connector: explicit Http11NioProtocol, remove attributes
  ignored when an Executor is referenced (maxThreads, maxQueueSize),
  replace disableUploadTimeout with connectionUploadTimeout, make
  connectionTimeout and maxHttpHeaderSize variables, drop useBodyEncodingForURI.
- Move Executor definition outside tomcat_http_enabled guard so it is present
  whenever any connector is active; move acceptCount to each Connector.
- Add tomcat_http_disable_when_ssl to suppress the HTTP connector when SSL
  is active.
- Add new defaults: tomcat_ssl_*, tomcat_connection_timeout,
  tomcat_upload_timeout, tomcat_max_http_header_size, tomcat_ssl_port,
  tomcat_ssl_protocols, tomcat_executor_accept_count,
  tomcat_executor_min_spare_threads.
- Rewrite README.md with full variable documentation and example playbooks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 18:28:10 +01:00
Andrea Dell'Amico 57c8615752
ignore the vscode settings. 2025-08-14 18:38:55 +02:00
Andrea Dell'Amico 0b139e457b
Ensure that /usr/lib/systemd/system exists. 2024-10-03 12:51:18 +02:00
Andrea Dell'Amico 6904b50e1d
Fix a variable name. 2024-08-05 15:15:19 +02:00
Andrea Dell'Amico a772d7a2f9
Add a tag to the task that prints the tomcat version. 2024-08-02 13:25:30 +02:00
Andrea Dell'Amico ca5d039f31
Attempt to fix another boolean. 2024-08-02 12:59:11 +02:00
Andrea Dell'Amico ce19b0da20
Fix a typo. 2024-08-02 12:55:29 +02:00
Andrea Dell'Amico c7e2c0dc8c
Fix a typo. 2024-08-02 12:53:52 +02:00
Andrea Dell'Amico 31fa1e2f45
Print the tomcat_use_systemd_unit value. 2024-08-02 12:51:47 +02:00
Andrea Dell'Amico 001e23c897
Fix the systemd unit installation check. 2024-08-01 15:01:32 +02:00
Andrea Dell'Amico d3c071f66b
Fix a task name. 2024-08-01 14:41:57 +02:00
Andrea Dell'Amico ec7ba6713b
A tag is missing. 2024-08-01 14:40:33 +02:00
Andrea Dell'Amico e2d1d33f0f
Reload systemd after installing the tomcat unit. 2024-08-01 14:36:57 +02:00
Andrea Dell'Amico 98f5875e8c
Add a tag to the tasks that set the version. 2024-08-01 13:38:43 +02:00
Andrea Dell'Amico 1a4923a6ac
Fix the distribution version check 2024-07-31 15:50:46 +02:00
Andrea Dell'Amico 2d4a27d216
Dupicated option. 2024-07-31 12:57:58 +02:00
Andrea Dell'Amico 39f3a8b96e
Add some tasks that add a systemd unit when it's not part of the package. 2024-07-24 18:19:10 +02:00
Andrea Dell'Amico 5251a37035
Do not use UseConcMarkSweepGC with openjdk > 11. 2024-07-22 14:22:14 +02:00
Andrea Dell'Amico be78981443
tomcat 10 uses 'tomcat' as a user in ubuntu. 2024-07-22 13:11:17 +02:00
Andrea Dell'Amico b9c9218418
Use version_compare for the version comparisons. 2024-07-22 11:22:58 +02:00
Andrea Dell'Amico 37fe32e4a0
There is no JasperListener in tomcat 8+. 2022-10-13 17:15:39 +02:00
Andrea Dell'Amico 6aba4296ad
Default for tomcat_catalina_shared_loader_path. 2022-07-18 18:10:55 +02:00
Andrea Dell'Amico 56902dbd93
Customization of catalina.properties. 2022-07-05 15:29:37 +02:00
Andrea Dell'Amico 68021df11c Merge pull request 'add tag tomcat_conf on some tomcat-pkgs tasks' (!1) from task/23350 into master
Reviewed-on: #1
2022-05-18 15:09:49 +02:00
Roberto Cirillo 1d0deb67f7 add tag tomcat_conf on some tomcat-pkgs tasks 2022-05-18 15:06:14 +02:00
Andrea Dell'Amico 02aa0ad579
Do not install javamelody on Ubuntu Trusty. 2022-03-29 16:26:31 +02:00
Andrea Dell'Amico c73136c06e Fixes #20713. protocolHeader="X-Forwarded-Proto". 2021-02-15 15:12:34 +01:00
Andrea Dell'Amico 8b870bfb9e Fix the installation of javamelody on Ubuntu Trusty 2020-12-01 21:38:07 +01:00
Andrea Dell'Amico a031904751 First import of the old role. 2020-06-01 18:55:11 +02:00
S2I2S @ ISTI-CNR c6346bdc61 Initial commit 2020-05-28 15:03:22 +02:00