diff --git a/dnet_user_services_perms/tasks/main.yml b/dnet_user_services_perms/tasks/main.yml index fad7284..cec4b53 100644 --- a/dnet_user_services_perms/tasks/main.yml +++ b/dnet_user_services_perms/tasks/main.yml @@ -38,6 +38,18 @@ with_items: dnet_log_directories tags: [ 'tomcat', 'dnet', 'users' ] +- name: Install additional packages, if needed + apt: pkg={{ item }} state=installed + with_items: dnet_additional_packages + when: dnet_additional_packages is defined + tags: ['dnet', 'pkgs'] + +- name: Install additional python modules, if needed + pip: name={{ item }} state=present + with_items: dnet_additional_python_modules + when: dnet_additional_python_modules is defined + tags: ['dnet', 'pkgs'] + # # Acls for the single tomcat instance # @@ -79,16 +91,15 @@ acl: name={{ item.0.instance_path }}/{{ item.1 }} entity={{ dnet_group }} etype=group permissions=rwx state=present when: tomcat_m_instances is defined with_nested: - - ' {{ tomcat_m_instances }}' + - '{{ tomcat_m_instances }}' - [ 'webapps', 'common', 'common/classes' ] tags: [ 'tomcat', 'dnet', 'users' ] - name: Set the default read/write permissions on the tomcat webapps and common/classes directories. multiple tomcat instances acl: name={{ item.0.instance_path }}/{{ item.1 }} entity={{ dnet_group }} etype=group permissions=rwx state=present default=yes - when: tomcat_m_instances is not defined when: tomcat_m_instances is defined with_nested: - - ' {{ tomcat_m_instances }}' + - '{{ tomcat_m_instances }}' - [ 'webapps', 'common', 'common/classes' ] tags: [ 'tomcat', 'dnet', 'users' ] diff --git a/fail2ban/handlers/main.yml b/fail2ban/handlers/main.yml index cdd2d5e..a6b3c1a 100644 --- a/fail2ban/handlers/main.yml +++ b/fail2ban/handlers/main.yml @@ -1,4 +1,6 @@ --- - name: Restart fail2ban service: name=fail2ban state=restarted enabled=yes + when: ( is_trusty ) or ( is_debian8 ) + diff --git a/iptables/handlers/main.yml b/iptables/handlers/main.yml index 44293ea..150d2e9 100644 --- a/iptables/handlers/main.yml +++ b/iptables/handlers/main.yml @@ -22,5 +22,5 @@ - name: Restart fail2ban service: name=fail2ban state=restarted enabled=yes - when: is_trusty + when: ( is_trusty ) or ( is_debian8 ) diff --git a/solr-tomcat-instance/defaults/main.yml b/solr-tomcat-instance/defaults/main.yml index 0fb5550..a3ec346 100644 --- a/solr-tomcat-instance/defaults/main.yml +++ b/solr-tomcat-instance/defaults/main.yml @@ -1,7 +1,6 @@ --- # solr solr_http_port: 8983 -tomcat_http_port: '{{ solr_http_port }}' tomcat_load_additional_default_conf: True tomcat_version: 7 # solr needs a lot of time to start if it needs to rebuild its indices @@ -13,7 +12,7 @@ solr_config_name: hindex solr_shards: 1 solr_instance: '{{ solr_service }}' solr_log_level: INFO -solr_http_port_1: '{{ tomcat_http_port }}' +solr_http_port_1: '{{ solr_http_port }}' solr_zoo_port: 9983 solr_zoo_port_1: 9984 solr_zoo_port_2: 9985 diff --git a/solr-tomcat-instance/meta/main.yml b/solr-tomcat-instance/meta/main.yml deleted file mode 100644 index a30f4a7..0000000 --- a/solr-tomcat-instance/meta/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -dependencies: - - role: '../../library/roles/tomcat-multiple-instances' diff --git a/tomcat-apache-requirements/meta/main.yml b/tomcat-apache-requirements/meta/main.yml index f3b1ad1..891b194 100644 --- a/tomcat-apache-requirements/meta/main.yml +++ b/tomcat-apache-requirements/meta/main.yml @@ -1,8 +1,8 @@ --- -dependencies: - - role: '../../library/roles/oracle-jdk' - - role: '../../library/roles/apache' - - role: '../../library/roles/tomcat' - when: tomcat_m_instances is not defined +#dependencies: +# - role: '../../library/roles/oracle-jdk' +# - role: '../../library/roles/apache' +# - role: '../../library/roles/tomcat' +# when: tomcat_m_instances is not defined # - role: '../../library/roles/tomcat-multiple-instances' # when: tomcat_m_instances diff --git a/tomcat-apache-requirements/tasks/java-requirements.yml b/tomcat-apache-requirements/tasks/java-requirements.yml index c065d71..5396df2 100644 --- a/tomcat-apache-requirements/tasks/java-requirements.yml +++ b/tomcat-apache-requirements/tasks/java-requirements.yml @@ -1,23 +1,8 @@ --- -- name: Install the apache proxy modules needed for tomcat - file: src=/etc/apache2/mods-available/{{ item }} dest=/etc/apache2/mods-enabled/{{ item }} state=link - with_items: - - proxy.load - - proxy_http.load - - proxy_ajp.load - notify: apache2 reload - tags: - - apache - - dnet - - name: Ensure that the jre/lib/endorsed exists file: dest={{ jdk_java_home }}/jre/lib/endorsed state=directory owner=root group=root mode=0755 - tags: - - apache - - dnet + tags: apache - name: Install the xercesImpl.jar needed by the dnet applications copy: src=xercesImpl.jar dest={{ jdk_java_home }}/jre/lib/endorsed/xercesImpl.jar owner=root group=root mode=0644 - tags: - - apache - - dnet + tags: apache diff --git a/tomcat-multiple-instances/templates/tomcat-server.xml.j2 b/tomcat-multiple-instances/templates/tomcat-server.xml.j2 index 0c8d696..d4f70d3 100644 --- a/tomcat-multiple-instances/templates/tomcat-server.xml.j2 +++ b/tomcat-multiple-instances/templates/tomcat-server.xml.j2 @@ -16,7 +16,11 @@ limitations under the License. --> +{% if item.shutdown_port == '-1' %} + +{% else %} + {% endif %}