Reload systemd after installing the tomcat unit.
This commit is contained in:
parent
98f5875e8c
commit
e2d1d33f0f
|
@ -110,15 +110,22 @@
|
||||||
group: root
|
group: root
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
notify: tomcat restart
|
notify: tomcat restart
|
||||||
|
register: reload_systemd
|
||||||
when:
|
when:
|
||||||
- tomcat_use_systemd_unit
|
- tomcat_use_systemd_unit
|
||||||
- ansible_distribution_version is version_compare('24.04', '<')
|
- ansible_distribution_version is version_compare('24.04', '<')
|
||||||
tags: ['tomcat', 'tomcat_serverxml', 'tomcat_conf']
|
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
|
- name: tomcat-pkgs | Install the systemd unit
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: tomcat-service.j2
|
src: tomcat-service.j2
|
||||||
dest: "/etc/systemd/system/tomcat{{ tomcat_version }}"
|
dest: "/usr/lib/systemd/system/tomcat{{ tomcat_version }}.service"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|
Loading…
Reference in New Issue