1
0
Fork 0

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
1 changed files with 4 additions and 4 deletions

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]) | tojson }}
data: {{ value.get('config', []) }} data: {{ value.get('config', []) | tojson }}
{% else %} {% else %}
path: [ {{ key }} ] path: [ {{ key | tojson }} ]
data: {{ value }} data: {{ value | tojson }}
{% endif %} {% endif %}
{% endif %} {% endif %}
{%- endfor -%} {%- endfor -%}