Install the systemd unit into the system path.
This commit is contained in:
parent
8a8375f80f
commit
d1d03d34ae
|
@ -260,7 +260,7 @@
|
||||||
- name: Install the instances systemd unit
|
- name: Install the instances systemd unit
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: tomcat-service.j2
|
src: tomcat-service.j2
|
||||||
dest: "/etc/systemd/system//tomcat-instance-{{ item.http_port }}"
|
dest: "/usr/lib/systemd/system/tomcat-instance-{{ item.http_port }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
@ -270,6 +270,14 @@
|
||||||
notify: tomcat multiple-instances restart
|
notify: tomcat multiple-instances restart
|
||||||
tags: ['tomcat', 'tomcat_instances', 'tomcat_init']
|
tags: ['tomcat', 'tomcat_instances', 'tomcat_init']
|
||||||
|
|
||||||
|
- name: Reload the systemd daemon if we are running on a systemd-backed server
|
||||||
|
ansible.builtin.systemd:
|
||||||
|
daemon-reload: true
|
||||||
|
when:
|
||||||
|
- ansible_service_mgr == 'systemd'
|
||||||
|
- tomcat_use_systemd_unit
|
||||||
|
tags: ['tomcat', 'tomcat_instances', 'tomcat_init']
|
||||||
|
|
||||||
- name: Install the helper script used by the systemd unit
|
- name: Install the helper script used by the systemd unit
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: tomcat-start.sh.j2
|
src: tomcat-start.sh.j2
|
||||||
|
@ -293,13 +301,6 @@
|
||||||
notify: tomcat multiple-instances restart
|
notify: tomcat multiple-instances restart
|
||||||
tags: ['tomcat', 'tomcat_instances', 'tomcat_conf', 'tomcat_default', 'jdk']
|
tags: ['tomcat', 'tomcat_instances', 'tomcat_conf', 'tomcat_default', 'jdk']
|
||||||
|
|
||||||
- name: Reload the systemd daemon if we are running on a systemd-backed server
|
|
||||||
ansible.builtin.systemd:
|
|
||||||
daemon-reload: true
|
|
||||||
when:
|
|
||||||
- ansible_service_mgr == 'systemd'
|
|
||||||
- tomcat_use_systemd_unit
|
|
||||||
|
|
||||||
- name: Install a custom context.xml file
|
- name: Install a custom context.xml file
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: tomcat-context.xml.j2
|
src: tomcat-context.xml.j2
|
||||||
|
|
Loading…
Reference in New Issue