Questions tagged «jinja»

2
如何在Saltstack中检查Jinja的输出?
我SLS在尝试构建的Salt中有一个模板,但是它发出的语法无效,这会导致诸如以下错误: my-minion-id: - State 'system' in SLS 'network' is not formed as a list 原则上,应该有可能以某种方式检查Jinja模板的输出,然后再尝试将输出解析为SLS文件。Jinja渲染器存在一个Python模块salt.renderers.jinja,但是如果我尝试在CLI上执行它,则会收到错误消息: # salt my-minion-id salt.renderers.jinja.render /srv/salt/network/init.sls my-minion-id: 'salt.renderers.jinja.render' is not available. ERROR: Minions returned with non-zero exit code # salt my-minion-id renderers.jinja.render /srv/salt/network/init.sls my-minion-id: 'renderers.jinja.render' is not available. ERROR: Minions returned with non-zero exit code 如何查看模板的输出?似乎很难调试是荒谬的。
16 salt  jinja 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.