Reload systemd after installing the tomcat unit.

This commit is contained in:
Andrea Dell'Amico 2024-08-01 14:36:57 +02:00
parent 98f5875e8c
commit e2d1d33f0f
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 8 additions and 1 deletions

View File

@ -110,15 +110,22 @@
group: root
mode: "0755"
notify: tomcat restart
register: reload_systemd
when:
- tomcat_use_systemd_unit
- ansible_distribution_version is version_compare('24.04', '<')
tags: ['tomcat', 'tomcat_serverxml', 'tomcat_conf']
- name: tomcat-pkgs | Reload the systemd daemon if we are running on a systemd-backed server
ansible.builtin.systemd:
daemon-reload: true
when: reload_systemd
tags: ['tomcat', 'tomcat_instances', 'tomcat_init']
- name: tomcat-pkgs | Install the systemd unit
ansible.builtin.template:
src: tomcat-service.j2
dest: "/etc/systemd/system/tomcat{{ tomcat_version }}"
dest: "/usr/lib/systemd/system/tomcat{{ tomcat_version }}.service"
owner: root
group: root
mode: "0644"