I'm trying to create yaml based configuration files. Everything is working except that the lines after a loop is being indented for some reason.
So when I have this...
- job_name: {{ inventory_hostname }}
pipeline_stages:
- regex:
expression: {{ pipeline_regex }}
- labels:
{% for labels in pipeline_vars %}
{{ labels }}:
{% endfor %}
- timestamp:
source: date
format: 2006-01-01 15:00:00.000000
the timestamp field is improperly indented..
scrape_configs:
- job_name: test
pipeline_stages:
- regex:
expression: Test
- labels:
Test:
Test2:
- timestamp:
source: date
format: 2006-01-01 15:00:00.000000
- drop:
If I put a comment in after the for loop that gets indented and the timestamp value is in the right place. I tried to remove the whitespace in the loop and that didn't fix the problem. I assume this is something simple but I am stumped.