Install the systemd unit into the system path.

This commit is contained in:
Andrea Dell'Amico 2024-08-01 14:28:41 +02:00
parent 8a8375f80f
commit d1d03d34ae
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 9 additions and 8 deletions

View File

@ -260,7 +260,7 @@
- name: Install the instances systemd unit
ansible.builtin.template:
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"
owner: root
group: root
@ -270,6 +270,14 @@
notify: tomcat multiple-instances restart
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
ansible.builtin.template:
src: tomcat-start.sh.j2
@ -293,13 +301,6 @@
notify: tomcat multiple-instances restart
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
ansible.builtin.template:
src: tomcat-context.xml.j2