diff --git a/d4s_user_services_perms/tasks/main.yml b/d4s_user_services_perms/tasks/main.yml index 1dde899e..de7de2da 100644 --- a/d4s_user_services_perms/tasks/main.yml +++ b/d4s_user_services_perms/tasks/main.yml @@ -1,12 +1,12 @@ --- +- include: d4s-basic-node.yml + when: gcore_node or d4s_additional_users - include: d4s-smartgears-node.yml when: smartgears_node - include: d4s-tomcat-node.yml when: d4s_tomcat_node - include: d4s-service-node.yml when: d4s_service_node -- include: d4s-basic-node.yml - when: gcore_node or d4s_additional_users - include: users-data-dirs.yml when: d4s_users_data_directories is defined - include: security_limits.yml diff --git a/nginx/tasks/nginx-config.yml b/nginx/tasks/nginx-config.yml index 10ced7cb..6edd9d53 100644 --- a/nginx/tasks/nginx-config.yml +++ b/nginx/tasks/nginx-config.yml @@ -4,7 +4,7 @@ file: dest={{ nginx_snippets_dir }} state=directory - name: Create the pki directory - file: dest={{ {{ pki_dir }}/nginx }} state=directory + file: dest={{ pki_dir }}/nginx state=directory - name: Create a dhparams file 2048 bits long shell: openssl dhparam -out {{ pki_dir }}/nginx/dhparams.pem 2048 diff --git a/python-env/tasks/main.yml b/python-env/tasks/main.yml index b675ca12..074cad3f 100644 --- a/python-env/tasks/main.yml +++ b/python-env/tasks/main.yml @@ -12,20 +12,6 @@ apt: name={{ item }} state={{ py_env_pkgs_state }} update_cache=yes cache_valid_time=600 with_items: '{{ py_pip_deps | default([]) }}' - - name: Fix the ssl warnings installing some ssl libraries - pip: name={{ item }} - with_items: '{{ py_env_pip_fix_ssl_warnings | default ([]) }}' - when: - - not py_env_trusty_workaround - - is_trusty - - - name: Install a list of pip packages - pip: name={{ item }} - with_items: '{{ py_env_pip_pkgs | default ([]) }}' - when: - - not py_env_trusty_workaround - - is_trusty - when: py_env_install tags: [ "python", "py_env" ] @@ -51,6 +37,13 @@ - name: Install setuptools version 33.1.1 pip: name=setuptools version=33.1.1 state=present + when: + - py_env_trusty_workaround + - py_env_install + - is_trusty + tags: [ "python", "py_env" ] + +- block: - name: Fix the ssl warnings installing some ssl libraries pip: name={{ item }} with_items: '{{ py_env_pip_fix_ssl_warnings | default ([]) }}' @@ -59,8 +52,9 @@ pip: name={{ item }} with_items: '{{ py_env_pip_pkgs | default ([]) }}' - when: - - py_env_trusty_workaround - - py_env_install - - is_trusty - tags: [ "python", "py_env" ] + - name: Install a list of versioned pip packages + pip: name={{ item.pkg }} version={{ item.version }} + with_items: '{{ py_env_versioned_pip_pkgs | default ([]) }}' + + when: py_env_install + tags: [ "python", "py_env", "py_env_pkgs" ] diff --git a/tomcat-multiple-instances/tasks/main.yml b/tomcat-multiple-instances/tasks/main.yml index b469515a..ee42680e 100644 --- a/tomcat-multiple-instances/tasks/main.yml +++ b/tomcat-multiple-instances/tasks/main.yml @@ -60,12 +60,23 @@ copy: src={{ item[1] }} dest={{ item.0.instance_path }}/conf/{{ item[1] }} owner={{ item.0.user }} group={{ item.0.user }} mode=0640 with_nested: - '{{ tomcat_m_instances }}' - - [ 'catalina.properties', 'context.xml', 'tomcat-users.xml', 'web.xml' ] + - [ 'context.xml', 'tomcat-users.xml', 'web.xml' ] register: restart_needed notify: - tomcat restart instances with changed configs tags: [ 'tomcat', 'tomcat_instances' ] +- name: Install catalina.properties + template: src={{ item[1] }}.j2 dest={{ item.0.instance_path }}/conf/{{ item[1] }} owner={{ item.0.user }} group={{ item.0.user }} mode=0640 + with_nested: + - '{{ tomcat_m_instances }}' + - [ 'catalina.properties' ] + register: restart_needed + notify: + - tomcat restart instances with changed configs + tags: [ 'tomcat', 'tomcat_instances', 'tomcat_catalina_properties' ] + + - name: Populate the instances conf/policy.d directory copy: src=policy.d/{{ item[1] }} dest={{ item.0.instance_path }}/conf/policy.d/{{ item[1] }} owner={{ item.0.user }} group={{ item.0.user }} mode=0640 with_nested: diff --git a/tomcat-multiple-instances/files/catalina.properties b/tomcat-multiple-instances/templates/catalina.properties.j2 similarity index 97% rename from tomcat-multiple-instances/files/catalina.properties rename to tomcat-multiple-instances/templates/catalina.properties.j2 index a3bb7bc4..bc1d2045 100644 --- a/tomcat-multiple-instances/files/catalina.properties +++ b/tomcat-multiple-instances/templates/catalina.properties.j2 @@ -126,3 +126,10 @@ tomcat.util.buf.StringCache.byte.enabled=true #tomcat.util.buf.StringCache.char.enabled=true #tomcat.util.buf.StringCache.trainThreshold=500000 #tomcat.util.buf.StringCache.cacheSize=5000 + +{% if tomcat_m_catalina_opts is defined %} +# Custom configurations +{% for opt in tomcat_m_catalina_opts %} +{{ opt }} +{% endfor %} +{% endif %}