有没有办法预览将在state.highstate. 我知道你可以运行state.show_highstate,但这不是我要找的输出。例如,里面/path/to/recurse/dir/我foo.txt和bar.txt在我的SLS文件我有
/path/to/recurse/dir/:
file.recurse:
- source: salt://dir/
Run Code Online (Sandbox Code Playgroud)
我想运行state.preview_highstate,它会向我显示foo.txt和的内容bar.txt。有谁知道如何在不跑步的情况下解决这个问题state.highstate?
如果您能够在 minion 上运行状态但不想应用任何更改,您可以将 附加test=True到您的命令中:
salt '*' state.highstate test=True
Run Code Online (Sandbox Code Playgroud)
这将在 minion 上运行 highstate,但不会对系统进行任何更改。将应用的更改以黄色显示。