设为首页 加入收藏

TOP

Saltstack_使用指南06_远程执行-指定目标(三)
2019-09-03 00:38:52 】 浏览:42
Tags:Saltstack_ 使用指南 06_ 远程 执行 指定 目标

 

8.4. 根据列表的minion IDs定义为节点组

 1 # 常规的定义方式
 2 nodegroups:
 3   group1: L@host1,host2,host3
 4 
 5 # YAML 定义方式
 6 nodegroups:
 7   group1:
 8     - host1
 9     - host2
10     - host3

 

9. 批量大小(-b)

1 # The 「-b」 (or 「--batch-size」) option allows commands to be executed on only a specified number of minions at a time.
2 # 同一时间执行多少 minion,支持百分比和数字。  
3 salt '*' -b 10 test.ping  # 同一时间执行 10 台,完毕后执行另外 10 台,依次执行下去
4 salt '*' -b 80% test.ping  # 同一时间执行 80% 的minion 端,完毕后执行另外 80%【实际是最后的 20%】。
5 salt -G 'os:RedHat' --batch-size 25% apache.signal restart  # 
6 
7 # --batch-wait minion返回后,等待多少秒在发送命令给新的minion
8 salt '*' -b 25% --batch-wait 5 test.ping   # 第一批minion反馈后,等待 5 秒后,在发送命令给下一批的minion。

 

 

首页 上一页 1 2 3 下一页 尾页 3/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇阿里云linux服务器打开端口号 下一篇阿里云CentOS自动备份MySql 8.0并..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目