Nodegroup分组
跳转到导航
跳转到搜索
nodegroup分组
配置和使用
vi /etc/salt/master #可以在原文件里面改 有样式了
nodegroups:
group1: L@host1,host2,host3
nodegroups:
redis: 'L@192.168.30.95,192.168.30.96'
group1: 'L@foo.domain.com,bar.domain.com,baz.domain.com or bl*.domain.com'
1131 # group2: 'G@os:Debian and foo.domain.com'
1132 # group3: 'G@os:Debian and N@group1'
1133 # group4:
1134 # - 'G@foo:bar'
1135 # - 'or'
1136 # - 'G@foo:baz'
service salt-master restart
[root@vm ~]# salt -N redis test.ping
192.168.30.95:
True
192.168.30.96:
True
salt -E 'web0(1|2)' cmd.run 'du -sh /data/*'
问题 : 在线上 有时 非常 的慢
有时有几个 no response web: Minion did not return. [No response]
参考
saltstack(四) saltstack的targeting、分组