From 1c2d775aa3d142a2281ed06ab3043f0e37e46f88 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 2 Aug 2024 13:46:52 +0200 Subject: [PATCH] Do not pass the SECURITY options when Ubuntu < 22.04. --- templates/tomcat-start.sh.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/tomcat-start.sh.j2 b/templates/tomcat-start.sh.j2 index c1c14c7..8038dd7 100644 --- a/templates/tomcat-start.sh.j2 +++ b/templates/tomcat-start.sh.j2 @@ -22,4 +22,8 @@ SECURITY="" # Start Tomcat +{% if ansible_distribution_version is version_compare('22.04', '<') %} +cd $CATALINA_BASE && exec $CATALINA_HOME/bin/catalina.sh run +{% else %} cd $CATALINA_BASE && exec $CATALINA_HOME/bin/catalina.sh run $SECURITY +{% endif %}