From a9e31abb4e9038c07aa223a6edca4f5ee15a3d2e Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 15 Feb 2018 19:10:48 +0100 Subject: [PATCH] library/roles/tomcat: Add the file.encoding setting to the main tomcat role too. --- tomcat/defaults/main.yml | 1 + tomcat/tasks/main.yml | 16 ++++++++-------- tomcat/templates/tomcat-default.j2 | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tomcat/defaults/main.yml b/tomcat/defaults/main.yml index f7d67c7a..2b072e41 100644 --- a/tomcat/defaults/main.yml +++ b/tomcat/defaults/main.yml @@ -14,6 +14,7 @@ tomcat_min_heap_size: 2048m tomcat_permgen_defined: True tomcat_heap_size: '{{ tomcat_min_heap_size }}' tomcat_permgen_size: 512m +tomcat_file_encoding: 'UTF-8' tomcat_java_opts: "-Xms{{ tomcat_min_heap_size }} -Xmx{{ tomcat_heap_size }}" tomcat_java_gc_opts: "-XX:+UseConcMarkSweepGC" #tomcat_other_java_opts: "-Djsse.enableSNIExtension=false" diff --git a/tomcat/tasks/main.yml b/tomcat/tasks/main.yml index 2edc764e..34cbfbdf 100644 --- a/tomcat/tasks/main.yml +++ b/tomcat/tasks/main.yml @@ -1,22 +1,22 @@ --- -- include: tomcat-pkgs.yml -- include: tomcat-admin.yml +- import_tasks: tomcat-pkgs.yml +- import_tasks: tomcat-admin.yml when: tomcat_install_admin -- include: tomcat-jmx.yml +- import_tasks: tomcat-jmx.yml when: - tomcat_jmx_enabled - tomcat_jmx_auth_enabled tags: [ 'tomcat', 'jmx' ] -- include: tomcat-log4j-logging.yml +- import_tasks: tomcat-log4j-logging.yml when: tomcat_use_log4j tags: [ 'tomcat', 'tomcat_log4j' ] -- include: tomcat-logger-logging.yml +- import_tasks: tomcat-logger-logging.yml when: not tomcat_use_log4j -- include: access_log.yml +- import_tasks: access_log.yml when: tomcat_access_log_enabled -- include: pgsql_jdbc.yml +- import_tasks: pgsql_jdbc.yml when: tomcat_install_pg_jdbc -- include: not_pgsql_jdbc.yml +- import_tasks: not_pgsql_jdbc.yml when: not tomcat_install_pg_jdbc diff --git a/tomcat/templates/tomcat-default.j2 b/tomcat/templates/tomcat-default.j2 index 3a94823e..3cff1115 100644 --- a/tomcat/templates/tomcat-default.j2 +++ b/tomcat/templates/tomcat-default.j2 @@ -13,7 +13,7 @@ TOMCAT{{ tomcat_version}}_GROUP={{ tomcat_user }} JAVA_HOME={{ jdk_java_home }} {% endif %} -JAVA_OPTS="-server -Djava.awt.headless=true" +JAVA_OPTS="-server -Djava.awt.headless=true -Dfile.encoding={{ tomcat_file_encoding }}" {% if jdk_default <= 7 %} {% if tomcat_permgen_defined %} {% if tomcat_permgen_size is defined %}