forked from ISTI-ansible-roles/ansible-roles
library/roles/d4s_user_services_perms: Fix the generation of the start/stop scripts. Now the multiuser option is supported.
This commit is contained in:
parent
a8849d5826
commit
13d224e336
|
@ -4,8 +4,8 @@
|
|||
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 }}.j2 dest={{ d4science_user_home }}/{{ item }} owner={{ d4science_user }} group={{ d4science_user }} mode=0755
|
||||
with_items:
|
||||
- startContainer.sh
|
||||
- stopContainer.sh
|
||||
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' ]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
sudo /etc/init.d/tomcat-instance-{{ http_port }} start
|
||||
sudo /etc/init.d/tomcat-instance-{{ item.0.http_port }} start
|
||||
|
||||
exit $?
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
sudo /etc/init.d/tomcat-instance-{{ http_port }} stop
|
||||
sudo /etc/init.d/tomcat-instance-{{ item.0.http_port }} stop
|
||||
|
||||
exit $?
|
||||
|
|
Loading…
Reference in New Issue