日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

saltstack-gdlwolf自学总结第二篇:salt常用帮助查找命令

發布時間:2025/5/22 编程问答 20 豆豆
生活随笔 收集整理的這篇文章主要介紹了 saltstack-gdlwolf自学总结第二篇:salt常用帮助查找命令 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

書接上回:saltstack-gdlwolf自學總結第一篇:saltstack的安裝部署(YUM安裝)

?

連接地址:http://gdlwolf.blog.51cto.com/343866/1786901

?

???????? 此博文主要記錄里下載saltstack中常用的幫助命令,當然也可以自行到saltstack的官方查詢,官網地址:

?

salt官方提供的一些方案

https://github.com/saltstack-formulas

?

了解YAML

http://docs.saltstack.cn/topics/yaml/index.html

?

salt模塊連接

https://docs.saltstack.com/en/latest/ref/states/all/index.html

?

saltstack 文件操作 state有很多種方法

https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html

?

1master-->salt命令幫助查看


[root@salt01?salt]#salt?-h Usage:?salt?[options]'<target>'?<function>?[arguments]Options:--version?????????????show?program's?version?number?andexit--versions-report?????show?program's?dependencies?version?numberand?exit-h,?--help????????????show?this?help?message?and?exit--saltfile=SALTFILE???Specify?the?path?to?a?Saltfile.?If?notpassed,?onewill?be?searched?for?inthe?current?working?directory-c?CONFIG_DIR,?--config-dir=CONFIG_DIRPass?in?an?alternativeconfiguration?directory.Default:?/etc/salt-t?TIMEOUT,?--timeout=TIMEOUTChange?the?timeout,?ifapplicable,?for?the?runningcommand;?default=5--hard-crash??????????Raise?any?original?exception?ratherthan?exitinggracefully?Default:False-s,?--static??????????Return?the?data?from?minions?as?agroup?after?they?allreturn.-p,?--progress????????Display?a?progress?graph.?[Requires`progressbar`python?package.]#以下省略N多行


2minion-->salt-call幫助查看


[root@salt02?home]#?salt-call-h Usage:?salt-call?[options]<function>?[arguments]Salt?call?is?used?to?executemodule?functions?locally?on?a?minionOptions:--version????????????show?program's?versionnumber?and?exit--versions-report?????show?program's?dependencies?version?numberand?exit-h,?--help????????????show?this?help?message?and?exit--saltfile=SALTFILE???Specify?the?path?to?a?Saltfile.?If?notpassed,?onewill?be?searched?for?inthe?current?working?directory-c?CONFIG_DIR,?--config-dir=CONFIG_DIRPass?in?an?alternativeconfiguration?directory.Default:?/etc/salt--hard-crash??????????Raise?any?original?exception?ratherthan?exitinggracefully?Default:False-g,?--grains??????????Return?the?information?generated?bythe?salt?grains-m?MODULE_DIRS,?--module-dirs=MODULE_DIRSSpecify?an?additionaldirectory?to?pull?modules?from.Multiple?directoriescan?be?provided?by?passing?`-m/--module-dirs`multiple?times.-d,?--doc,?--documentationReturn?thedocumentation?for?the?specified?module?orfor?all?modules?if?noneare?specified.--master=MASTER???????Specify?the?master?to?use.?The?minionmust?beauthenticated?with?themaster.?If?this?option?isomitted,?the?masteroptions?from?the?minion?configwill?be?used.?If?multimasters?are?set?up?the?first #以下省略N多行


3master-->查看saltstack內置模塊信息


3.1、簡單查找,不包含詳細信息

salt'salt02'?sys.list_modules



3.2、較詳細的查看salt模塊信息

?

salt?'salt02'?sys.list_functions



3.3、較詳細的查看salt某一個模塊信息(例如status

salt?'salt02'sys.list_functions?status


3.4、詳細查看salt內置模塊,帶樣例

salt?'salt02'?sys.doc


3.5、詳細查看salt內置某一個模塊(例如status),帶樣例


salt?'salt02'?sys.doc?status


轉載于:https://blog.51cto.com/gdlwolf/1786904

總結

以上是生活随笔為你收集整理的saltstack-gdlwolf自学总结第二篇:salt常用帮助查找命令的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。