1
0
Fork 0
mirror of synced 2024-12-21 21:51:09 -05:00

Merge pull request #42 from waynegemmell/patch-2

Context data wrapped with tojson filter.
This commit is contained in:
Niels Abspoel 2019-03-11 19:53:54 +01:00 committed by GitHub
commit ff2d7c790b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,11 +22,11 @@ logrotate-{{ key }}:
- template: jinja - template: jinja
- context: - context:
{% if value is mapping %} {% if value is mapping %}
path: {{ value.get('path', [key]) }} path: {{ value.get('path', [key]) | json }}
data: {{ value.get('config', []) }} data: {{ value.get('config', []) | json }}
{% else %} {% else %}
path: [ {{ key }} ] path: [ {{ key | json }} ]
data: {{ value }} data: {{ value | json }}
{% endif %} {% endif %}
{% endif %} {% endif %}
{%- endfor -%} {%- endfor -%}