有没有办法做:
salt '*' state.apply nginx test=True
通过salt-api
吗?
我正在这样做:
curl -sSk http://salt:8000
-H 'Accept: application/x-yaml'
-H 'X-Auth-Token: token'
-d client=local
-d tgt='*'
-d fun=state.apply
-d arg=nginx
-d test=True
但是它实际上适用于新状态。
提前感谢!
curl -sSk http://salt:8000/run
而不是curl -sSk http://salt:8000
的内容>并且您在每个选项的末尾都使用\
吗?
否则看起来不错,您正在运行哪个版本的salt?
https://salt-sproxy.readthedocs.io/en/latest/salt_api.html <=良好的阅读效果>>