library/roles/d4s_user_services_perms: New task for the generic tomcat installation

This commit is contained in:
Andrea Dell'Amico 2016-06-23 17:57:20 +02:00
parent 330a79521d
commit 08c900a2e3
4 changed files with 30 additions and 2 deletions

View File

@ -0,0 +1,19 @@
---
- name: Install the sudoers config that permits the tomcat user to restart the service
template: src=tomcat-sudoers.j2 dest=/etc/sudoers.d/tomcat-d4science owner=root group=root mode=0440
tags: [ 'tomcat', 'd4science', 'sudo' ]
- name: Install the script that allows the tomcat user to start and stop the service without using the full path
template: src={{ item.1 }}.j2 dest={{ item.0.user_home }}/{{ item.1 }} owner={{ item.0.user }} group={{ item.0.user }} mode=0755
with_nested:
- '{{ tomcat_m_instances }}'
- [ 'startContainer.sh', 'stopContainer.sh' ]
tags: [ 'tomcat', 'd4science', 'sudo' ]
- name: Install the README file that explains where the options files are placed and how start/stop the service
template: src={{ item.1 }}.j2 dest={{ item.0.user_home }}/{{ item.1 }} owner={{ item.0.user }} group={{ item.0.user }} mode=0444
with_nested:
- '{{ tomcat_m_instances }}'
- [ 'README-tomcat' ]
tags: [ 'tomcat', 'd4science', 'd4s_readme' ]

View File

@ -1,5 +1,7 @@
---
- include: d4s-smartgears-node.yml
when: smartgears_node is defined and smartgears_node
- include: d4s-tomcat-node.yml
when: d4s_tomcat_node is defined and d4s_tomcat_node
- include: d4s-basic-node.yml
when: gcore_node is defined and gcore_node

View File

@ -0,0 +1,7 @@
The java options are set inside /etc/default/tomcat-instance-{{ item.0.http_port }}
The commands that start and stop the containers are:
{{ d4science_user_home }}/startContainer.sh
{{ d4science_user_home }}/stopContainer.sh
The log files live inside /home/gcube/tomcat/logs (it's a symbolic link to {{ tomcat_m_instances_logdir_base }}/{{ item.0.http_port }})

View File

@ -2,7 +2,7 @@ The java options are set inside /etc/default/tomcat-instance-{{ item.0.http_port
The GHN environment variables are set inside /etc/default/tomcat-instance-{{ item.0.http_port }}.local
The commands that start and stop the containers are:
/home/gcube/startContainer.sh
/home/gcube/stopContainer.sh
{{ d4science_user_home }}/startContainer.sh
{{ d4science_user_home }}/stopContainer.sh
The log files live inside /home/gcube/tomcat/logs (it's a symbolic link to {{ tomcat_m_instances_logdir_base }}/{{ item.0.http_port }})