Hi @all,
I am trying to use a macro in an ansible template:
{% macro logging(ltype) %}`
``
{% if ltype == 'fluentd' %}
logging:
driver: 'fluentd'
options:
tag: "{{ app_name }}.{{ '{{' }}.Name{{ '}}' }}"
labels: "mylabel"
{% endif %}
{% endmacro %}
...
{{ logging('fluentd') }}
...
`
When I render it (template module), I am always getting
`
…
logging:
driver: ‘fluentd’
options:
tag: “test.{{.Name}}”
labels: “fhg.iam.appname,fhg.iam.hostname,fhg.iam.publicip,fhg.iam.privateip”
…
`
So apparently 'logging is indented right, but everything else just loses its indentation. Has anyone else got any similar problem?