From 38a57334499a9876c400c393624b5c03f34343fc Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Tue, 18 Apr 2023 09:15:55 +0100 Subject: [PATCH] Fix issue with jinja2 < 2.11.0 Ubuntu 20.04 LTS has jinja2 2.10.1, which doesn't support `is true` and various other `is` tests added in https://github.com/pallets/jinja/pull/824 Fix: ``` TASK [galaxyproject.galaxy : Schedule tmpclean cron job (root)] ******************************************************************************************************************************************* fatal: [gat-18.eu.galaxy.training]: FAILED! => msg: |- An unhandled exception occurred while templating '{{ (galaxy_tmpclean_log is not true) | ternary( ((galaxy_tmpclean_log is none) | ternary( '>/dev/null', '>>' ~ galaxy_tmpclean_log )), '' ) }}'. Error was a , original message: template error while templating string: no test named 'true'. String: {{ (galaxy_tmpclean_log is not true) | ternary( ((galaxy_tmpclean_log is none) | ternary( '>/dev/null', '>>' ~ galaxy_tmpclean_log )), '' ) }} ``` --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index ac7c4ae..b1c88c2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -188,7 +188,7 @@ _galaxy_tmpclean_command: galaxy_tmpclean_verbose_statement: "{{ galaxy_tmpclean_verbose | ternary(' -v', '') }}" galaxy_tmpclean_log_statement: >- - {{ (galaxy_tmpclean_log is not true) | ternary( + {{ (galaxy_tmpclean_log != true) | ternary( ((galaxy_tmpclean_log is none) | ternary( '>/dev/null', '>>' ~ galaxy_tmpclean_log