since the error is a yaml error it most likely wouldn’t help much as what line of code would not correspond to the jinja lined code. but to the rendered yaml code afterwords.
there are two paths forward. first generate the yaml using slsutil.renderer
salt-call slsutil.renderer salt:/path/to/sls.sls default_renderer=jinja
this will give you yaml you can pass through a yaml lint
it will also let you see what the output of just the pure jinja is.
the other path is if you are on 3004 or later. install yamllint into your python on the salt minion and you have a built in yaml renderer. this is only a yaml linter so will break if the jinja is broken
salt-call yaml.lint salt://path/to/sls.sls pre_render=jinja
one thing to note. don’t shell out just to echo when you want to put a message in your states. this is actually a detriment to the system. you are causing more load on the system for a simple message. use the test states. they are both more informative. and can be used to give more depth to the messages.
see https://docs.saltproject.io/en/latest/ref/states/all/salt.states.test.html for the test states. they also can be used for logic within the state tree.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/0630b4fa-54ad-4149-a03b-40f5072ddc0cn%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Salt-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/salt-users/38LxBZH-5h4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CAPaX09hbzxMHYUcWQBssRj4%2BD7TAVt3mdPmFCOVpxpQEXJ65qg%40mail.gmail.com.