library/roles: d4s_user_services_perms, fixes to the tasks so that they work if we have multiple tomcat installations but only a subset of them have smartgears installed.

library/roles/smartgears/smartgears/templates/container.xml.j2: Cosmetic fix.
This commit is contained in:
Andrea Dell'Amico 2017-01-25 16:03:23 +01:00
parent 6bd5e63426
commit ec51482863
2 changed files with 5 additions and 1 deletions

View File

@ -8,6 +8,7 @@
with_nested:
- '{{ tomcat_m_instances | default([]) }}'
- [ 'startContainer.sh', 'stopContainer.sh' ]
when: not item.0.skip_smartgears
tags: [ 'tomcat', 'd4science', 'sudo' ]
- name: Install the README file that explains where the options files are placed and how start/stop the service
@ -15,6 +16,7 @@
with_nested:
- '{{ tomcat_m_instances | default([]) }}'
- [ 'README' ]
when: not item.0.skip_smartgears
tags: [ 'tomcat', 'd4science', 'd4s_readme' ]
# - name: Set the read/write permissions on the tomcat default options files
@ -27,11 +29,13 @@
- name: Set the read/write permissions on the tomcat default options files
acl: name=/etc/default/tomcat-instance-{{ item.http_port }} entity={{ item.user }} etype=user permissions=rw state=present
with_items: '{{ tomcat_m_instances | default([]) }}'
when: not item.skip_smartgears
tags: [ 'tomcat', 'd4science', 'acl' ]
- name: Set the read/write permissions on the tomcat default local options files
acl: name=/etc/default/tomcat-instance-{{ item.http_port }}.local entity={{ item.user }} etype=user permissions=rw state=present
with_items: '{{ tomcat_m_instances | default([]) }}'
when: not item.skip_smartgears
tags: [ 'tomcat', 'd4science', 'acl' ]
ignore_errors: True

View File

@ -1,7 +1,7 @@
<container mode='{{ smartgears_mode }}'>
<hostname>{{ smartgears_hostname }}</hostname>
{%if setup_nginx %}
{% if setup_nginx %}
{% if https_port is defined %}
{% if http_redirect_to_https is defined and http_redirect_to_https %}
<port>{{ https_port }}</port>