salt-11-salt-ssh
不需要启动salt-minion来使用salt
安装salt-ssh
salt-ssh是串行运行的,所以效率上一定不如minion方式,只是提供了另一种执行方式
yum install -y salt-ssh
vim /etc/salt/roster
linux-node1.example.com: host: 192.168.1.61 user: root passwd: 123456 port: 22 linux-node2.example.com: host: 192.168.1.62 user: root passwd: 123456 port: 22
第1次执行先加个-i,交互询问一下
salt-ssh '*' test.ping -i
执行原生shell命令 -r
salt-ssh '*' -r 'uptime'

浙公网安备 33010602011771号