Commit Graph

13 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 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 001e23c897
Fix the systemd unit installation check. 2024-08-01 15:01:32 +02:00
Andrea Dell'Amico 1a4923a6ac
Fix the distribution version check 2024-07-31 15:50:46 +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 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 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