sysmod:
官網鏈接https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.sysmod.html
The sys module provides information about the available functions on the minion,sys模塊提供了關于Minion上可用功能的信息
在命令行中以sys方法使用,比如:salt '192.168.2.221' sys.list_function //列出此minion上可用的功能
sys模塊平常主要用來查看salt的幫助信息:比方說,我想知道sys模塊提供哪些功能,并且每個功能該如何使用?
salt '192.168.2.221' sys.argspec sys //整個模塊
salt '192.168.2.221' sys.argspec pkg.install //模塊下,install方法的使用
list_modules //查看minion支持的模塊
list_renderers //查看minion支持的render渲染功能的模塊
reload_modules //minion重載模塊
.......
saltutil:
官網鏈接https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html
The Saltutil module is used to manage the state of the salt minion itself. It is used to manage minion modules as well as automate updates to the salt minion.
saltutil.clear_cache //清空minion上的緩存
find_cached_job //緩存待執行的Job
find_job //正在執行的Job
refresh_grains //刷新minion上的grains信息
refresh_pillar //刷新pillar信息