ikjjty656r 发表于 2015-8-20 11:26:03

Saltstack系列:Saltstack分组

关于Saltstack分组的混合匹配:(Compound matchers)
1.修改配置文件,添加组。

1
2
3
4
5
6
7
8
9
# vim /etc/salt/master
nodegroups:
group1: 'L@node2,node3'
group2: 'S@192.168.64.131'
group3: 'S@192.168.64.0/24'
group4: 'E@node'
# /etc/init.d/salt-master restart
Stopping salt-master daemon:                               [确定]
Starting salt-master daemon:                               [确定]




2.测试添加效果:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# salt -N group1 test.ping
node3:
    True
node2:
    True
# salt -N group2 test.ping
node3:
    True
# salt -N group3 test.ping
node3:
    True
node2:
    True
# salt -N group4 test.ping
node2:
    True
node3:
    True



页: [1]
查看完整版本: Saltstack系列:Saltstack分组