安装salt-minion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
新增minion:
【svr205-2】
[root@svr205-2 ~]
# yum install salt-minion -y
[root@svr205-2 ~]
# vim /etc/salt/minion
master: 10.0.200.21
id
: svr205-2
或则,使用脚本来更改配置:
[root@svr205-2 ~]
# cat saltstack-install-minion.sh
#!/bin/bash
#
# 2015/4/21
srv_ip=10.0.200.21
yum
install
salt-minion -y
cp
-a
/etc/salt/minion
/etc/salt/minion
.bak
cat
<<_EOF >
/etc/salt/minion
master: ${srv_ip}
id
: $(
hostname
)
_EOF
service salt-minion start
cat
/etc/salt/minion
|
本文转自 pcnk 51CTO博客,原文链接:http://blog.51cto.com/nosmoking/1636363,如需转载请自行联系原作者