/usr/lib/systemd/system does not exist on Ubuntu 18.04.
This commit is contained in:
parent
8570d5ff5b
commit
1a3c99b5eb
|
|
@ -257,10 +257,21 @@
|
||||||
when: tomcat_use_systemd_unit
|
when: tomcat_use_systemd_unit
|
||||||
tags: ['tomcat', 'tomcat_instances', 'tomcat_init']
|
tags: ['tomcat', 'tomcat_instances', 'tomcat_init']
|
||||||
|
|
||||||
|
- name: Check if /usr/lib/systemd/system exists
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: /usr/lib/systemd/system
|
||||||
|
register: systemd_system_path
|
||||||
|
tags: ['tomcat', 'tomcat_instances', 'tomcat_init']
|
||||||
|
|
||||||
|
- name: Define the installation path of the systemd unit
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
systemd_unit_dest_dir: '{% if systemd_system_path.stat.exists %}/usr/lib/systemd/system{% else %}/etc/systemd/system{% endif %}'
|
||||||
|
tags: ['tomcat', 'tomcat_instances', 'tomcat_init']
|
||||||
|
|
||||||
- name: Install the instances systemd unit
|
- name: Install the instances systemd unit
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: tomcat-service.j2
|
src: tomcat-service.j2
|
||||||
dest: "/usr/lib/systemd/system/tomcat-instance-{{ item.http_port }}.service"
|
dest: "{{ systemd_unit_dest_dir }}/tomcat-instance-{{ item.http_port }}.service"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ org.apache.catalina.startup.ContextConfig.jarsToSkip=
|
||||||
|
|
||||||
# Additional JARs (over and above the default JARs listed above) to skip when
|
# Additional JARs (over and above the default JARs listed above) to skip when
|
||||||
# scanning for TLDs. The list must be a comma separated list of JAR file names.
|
# scanning for TLDs. The list must be a comma separated list of JAR file names.
|
||||||
org.apache.catalina.startup.TldConfig.jarsToSkip=tomcat7-websocket.jar
|
org.apache.catalina.startup.TldConfig.jarsToSkip=tomcat-websocket.jar
|
||||||
|
|
||||||
#
|
#
|
||||||
# String cache configuration.
|
# String cache configuration.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue