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?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/daa8e0d5-e08b-4f40-9049-bd87ad77329a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.