prometheus-community / ansible

Ansible Collection for Prometheus
https://prometheus-community.github.io/ansible/
Apache License 2.0
328 stars 116 forks source link

Process Exporter Service failing due to error in Config file #358

Open prakyathraj opened 2 months ago

prakyathraj commented 2 months ago

process_exporter_names attribute is passed as string in Json format as suggested in doc https://prometheus-community.github.io/ansible/branch/main/process_exporter_role.html . Even though it works with default value, it fails when we set custom values. So, we need to pass value in same line instead of newline as done in manual Fix screenshot.

Screenshot 2024-05-10 at 4 30 55 PM

Issue: Screenshot 2024-05-10 at 4 30 01 PM Screenshot 2024-05-10 at 4 21 51 PM

Fix: Screenshot 2024-05-10 at 4 28 18 PM

gitperr commented 2 months ago

It should also be working on newline, could it be because of spacing with custom values?

YAML can be quite unpredictable with scoping sometimes.

It would be useful if you added some before / after code in jinja and templated to yaml to see what errors out.