From a8849d5826682e594793a2666486ac5162bedf26 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 9 Jun 2015 16:01:35 +0200 Subject: [PATCH] library/roles/tomcat, library/roles/tomcat-multiple-instances: manage separately 'unpackwars' and 'autodeploy'. --- tomcat-multiple-instances/defaults/main.yml | 5 +++-- .../templates/tomcat-server.xml.j2 | 12 +++++++++++- tomcat/defaults/main.yml | 3 ++- tomcat/templates/tomcat-server.xml.j2 | 2 +- yii/defaults/main.yml | 1 + 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/tomcat-multiple-instances/defaults/main.yml b/tomcat-multiple-instances/defaults/main.yml index eadeb720..c1f8cd0f 100644 --- a/tomcat-multiple-instances/defaults/main.yml +++ b/tomcat-multiple-instances/defaults/main.yml @@ -28,7 +28,8 @@ tomcat_m_java_gc_opts: "-XX:+UseConcMarkSweepGC" # the "-XX:+CMSIncrementalMode" option. #tomcat_m_other_java_opts: "-Djsse.enableSNIExtension=false" tomcat_m_other_java_opts: "" -tomcat_m_autodeploy: False +tomcat_m_webapps_autodeploy: False +tomcat_m_webapps_unpack: False # JMX and debugging tomcat_m_enable_remote_debugging: False @@ -43,5 +44,5 @@ tomcat_m_jmx_auth_enabled: False # This is only an example. Insert a line for each tomcat instance. 'app_contexts' can be used to automatically configure apache or nginx virtualhost http/ajp proxy # #tomcat_m_instances: -# - { http_enabled: True, http_port: '8180', http_address: '0.0.0.0', ajp_enabled: False, ajp_port: '8109', ajp_address: '127.0.0.1', restart_timeout: '{{ tomcat_m_restart_timeout }}', shutdown_port: '8105', java_home: '{{ jdk_java_home }}', user: '{{ tomcat_m_default_user }}', user_home: '{{ tomcat_m_instances_base_path }}', user_shell: '{{ tomcat_m_default_user_shell }}', instance_path: '{{ tomcat_m_instances_base_path }}/8180', max_threads: '{{ tomcat_m_max_threads }}', autodeploy: '{{ tomcat_m_autodeploy }}', default_conf: True, java_opts: '{{ tomcat_m_java_opts }}', java_gc_opts: '{{ tomcat_m_java_gc_opts }}', other_java_opts: '{{ tomcat_m_other_java_opts }}', jmx_enabled: '{{ tomcat_m_jmx_enabled }}', jmx_auth_enabled: '{{ tomcat_m_jmx_auth_enabled }}', jmx_auth_dir: '{{ tomcat_m_instances_base_path }}/8180/conf', jmx_port: '8182', jmx_monitorpass: '{{ set_in_a_vault_file }}', jmx_controlpass: '{{ set_in_a_vault_file }}', remote_debugging: '{{ tomcat_m_enable_remote_debugging }}', remote_debugging_port: '8100', access_log_enabled: True, log_rotation_freq: daily, log_retain: 30, allowed_hosts: [ 'xxx.xxx.xxx.xxx/32', 'yyy.yyy.yyy.yyy/32' ], app_contexts: [ 'app1', 'app2' ] } +# - { http_enabled: True, http_port: '8180', http_address: '0.0.0.0', ajp_enabled: False, ajp_port: '8109', ajp_address: '127.0.0.1', restart_timeout: '{{ tomcat_m_restart_timeout }}', shutdown_port: '8105', java_home: '{{ jdk_java_home }}', user: '{{ tomcat_m_default_user }}', user_home: '{{ tomcat_m_instances_base_path }}', user_shell: '{{ tomcat_m_default_user_shell }}', instance_path: '{{ tomcat_m_instances_base_path }}/8180', max_threads: '{{ tomcat_m_max_threads }}', autodeploy: '{{ tomcat_m_webapps_autodeploy }}', unpack: '{{ tomcat_m_webapps_unpack }}',default_conf: True, java_opts: '{{ tomcat_m_java_opts }}', java_gc_opts: '{{ tomcat_m_java_gc_opts }}', other_java_opts: '{{ tomcat_m_other_java_opts }}', jmx_enabled: '{{ tomcat_m_jmx_enabled }}', jmx_auth_enabled: '{{ tomcat_m_jmx_auth_enabled }}', jmx_auth_dir: '{{ tomcat_m_instances_base_path }}/8180/conf', jmx_port: '8182', jmx_monitorpass: '{{ set_in_a_vault_file }}', jmx_controlpass: '{{ set_in_a_vault_file }}', remote_debugging: '{{ tomcat_m_enable_remote_debugging }}', remote_debugging_port: '8100', access_log_enabled: True, log_rotation_freq: daily, log_retain: 30, allowed_hosts: [ 'xxx.xxx.xxx.xxx/32', 'yyy.yyy.yyy.yyy/32' ], app_contexts: [ 'app1', 'app2' ] } diff --git a/tomcat-multiple-instances/templates/tomcat-server.xml.j2 b/tomcat-multiple-instances/templates/tomcat-server.xml.j2 index bb9485ee..0c8d6968 100644 --- a/tomcat-multiple-instances/templates/tomcat-server.xml.j2 +++ b/tomcat-multiple-instances/templates/tomcat-server.xml.j2 @@ -77,7 +77,17 @@ + {% if item.unpack is defined %} + unpackWARs="{{ item.unpack }}" + {% else %} + unpackWARs="False" + {% endif %} + {% if item.autodeploy is defined %} + autoDeploy="{{ item.autodeploy }}" + {% else %} + autoDeploy="False" + {% endif %} + > {% if item.access_log_enabled %} diff --git a/yii/defaults/main.yml b/yii/defaults/main.yml index 4e5273e1..394ead1a 100644 --- a/yii/defaults/main.yml +++ b/yii/defaults/main.yml @@ -22,6 +22,7 @@ yii_php_modules: - php5-xcache - php5-gd - php5-mcrypt + - php5-curl yii_php_db_server_modules: - php5-pgsql