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