模块
1.salt-ssh
yum install salt-ssh
vim /etc/salt/roster
centos6.5-06:
host:192.168.17.145
user:root
passwd:111111
port: 22
timeout: 30
问题: salt-ssh"*" test.ping
The host key needs to be accepted, toauto accept run salt-ssh with the -i flag:
Theauthenticity of host '192.168.17.145 (192.168.17.145)' can't be established.
RSA keyfingerprint is 4c:89:e6:46:95:cf:a9:52:df:ff:bf:9d:25:93:da:f2.
Are you sure you want to continue connecting(yes/no)?
解决方法:原因是无法输入yes命令无法继续执行
[root@bogon salt]# touch/root/.ssh/config
[root@bogon salt]# vim/root/.ssh/config
host 192.168.17.146 -------minion端ip
StrictHostKeyChecking no
[root@bogon salt]# salt-ssh "*"cmd.run "df -h"
centos6.5-06:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 18G 3.5G 13G 22% /
tmpfs 495M 96K 495M 1% /dev/shm
/dev/sda1 485M 35M 426M 8% /boot