Di default sono utilizzabili le seguenti variabili:

Custom filters

Since 2017.7 version tons of custom filters are added. See official documentation.

Interesting filters:

Equality

{% if 'a' is match('[a-b]') %}
    < statements >
{% endif %}
{% if 1 is equalto(1) %}
    < statements >
{% endif %}
{{ [{'value': 1}, {'value': 2} , {'value': 3}] | selectattr('value', 'equalto', 3) | list }}

salt alias

Since 2014.7:

# The following two function calls are equivalent.
{{ salt['cmd.run']('whoami') }}
{{ salt.cmd.run('whoami') }}

Sitografia

MyWiki: Salt/Jinja (last edited 2017-07-20 15:42:29 by risca)