Open prakyathraj opened 6 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.
@prakyathraj please post the variable you are attempting to use.
Btw, you can take a look at the alternative molecule scenario for more examples of a working config https://github.com/prometheus-community/ansible/blob/f3514a9e97dfc3d64f02aefd299487efd99e779f/roles/process_exporter/molecule/alternative/molecule.yml#L18-L29
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.Issue:
Fix: