Ensure that /usr/lib/systemd/system exists.

This commit is contained in:
Andrea Dell'Amico 2024-10-03 12:51:18 +02:00
parent 6904b50e1d
commit 0b139e457b
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 14 additions and 4 deletions

View File

@ -121,10 +121,13 @@
- ansible_distribution_version is version_compare('24.04', '<')
tags: ['tomcat', 'tomcat_serverxml', 'tomcat_conf', 'tomcat_init']
- 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
- name: tomcat-pkgs | Ensure that /usr/lib/systemd/system exists
ansible.builtin.file:
path: /usr/lib/systemd/system
state: directory
owner: root
group: root
mode: "0755"
tags: ['tomcat', 'tomcat_instances', 'tomcat_init']
- name: tomcat-pkgs | Install the systemd unit
@ -135,11 +138,18 @@
group: root
mode: "0644"
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 a slightly modified catalina.properties
ansible.builtin.template:
src: catalina.properties.j2