Hey Maciej,
This is a common occurence with Jinja version lower than 2.10. Check
which one
you have and upgrade it to at least 2.10, that should fix the issue. Let me
know if that helped.
I already checked. Installed versions:
ansible==2.8.0
Jinja2==2.10
python version = 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0]
\Fabian