Reload systemd after installing the tomcat unit.
This commit is contained in:
parent
98f5875e8c
commit
e2d1d33f0f
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue