是否可以通过salt-api测试state.apply?

问题描述 投票:0回答:1

有没有办法做:

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

但是它实际上适用于新状态。

提前感谢!

api curl salt-stack salt
1个回答
0
投票
curl -sSk http://salt:8000/run而不是curl -sSk http://salt:8000的内容>

并且您在每个选项的末尾都使用\吗?

否则看起来不错,您正在运行哪个版本的salt?

https://salt-sproxy.readthedocs.io/en/latest/salt_api.html <=良好的阅读效果>>

© www.soinside.com 2019 - 2024. All rights reserved.