########################################################################
## the roster file on master, the default location is /etc/salt/roster
##
## Note: sudo works only if NOPASSWD is set for user in
## /etc/sudoers:
## fred ALL=(ALL) NOPASSWD: ALL
## web1:
## host: 192.168.122.201
## user: fred
## passwd: aYtdhD
## sudo: True
########################################################################
chd1:
host: 192.168.122.201
user: root
passwd: Abc123
sudo: True
cdh2:
host: 192.168.122.202
user: root
passwd: Abc123
sudo: True
cdh3:
host: 192.168.122.203
user: root
passwd: Abc123
sudo: True
cdh4:
host: 192.168.122.204
user: root
passwd: Abc123
sudo: True
cdh5:
host: 192.168.122.205
user: root
passwd: Abc123
sudo: True
然后重启服务service salt-master restart。就可以直接返问节点了:
# salt-ssh 'cdh1' test.ping
minion上的故障排除:
当一切配置都正确, 启动minion时
# service salt-minion start
遇到错误:
salt-minion dead but pid file exists
采用debug模式查找错误:
# salt-minion -l debug
可见输出:
[CRITICAL] The Salt Master server's public key did not authenticate!
The master may need to be updated if it is a version of Salt lower than 2014.7.1, or
If you are confident that you are connecting to a valid Salt Master, then remove the master public key and restart the Salt Minion.
The master public key can be found at: