1
0
Fork 0
mirror of synced 2024-12-30 09:49:28 -05:00

Context data wrapped with tojson filter.

This commit is contained in:
waynegemmell 2019-03-11 16:45:10 +02:00 committed by GitHub
parent 6a43ccab3a
commit 06859f5fbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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