Skip to content

Commit

Permalink
Fix issue with jinja2 < 2.11.0
Browse files Browse the repository at this point in the history
Ubuntu 20.04 LTS has jinja2 2.10.1, which doesn't support `is true` and various other `is` tests added in pallets/jinja#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 <class 'ansible.errors.AnsibleError'>, 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
        )),
        ''
    ) }}
```
  • Loading branch information
nsoranzo authored Apr 18, 2023
1 parent c96682c commit 38a5733
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 38a5733

Please sign in to comment.