saltstack安装使用
官网地址:https://docs.saltstack.com/en/latest/
安装
saltstack
1. ? sudo yum install https://repo.saltstack.com/py3/redhat/salt-py3-repo-latest.el7.noarch.rpm
2. 控制端
yum install salt-master -y
配置
vi /etc/salt/master
interface: 0.0.0.0
3. 被控制端
yum install salt-minion
配置
vi /etc/salt/minion
master: 10.0.0.128
4. 授权
salt-key -L 查看所有授权
salt-key -A 接受所有的授权
5. 没有ip或主机名的时候关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
6. 执行命令
salt '10.0.0.129' cmd.run 'ls'
salt '*' cmd.run 'ls'