一
.archive模塊
實現系統層面的壓縮包調用,支持gzip、gunzip、rar、tar、unrar、unzip等linux
**二.搭建salt stack**
1.設置 hostname
hostnamectl set-hostname saltstack 服務端
hostnamectl set-hostname client 客戶端shell
2.關閉SElinux
#服務端和客戶端都要配置
vim /etc/selinux/config
將SELINUX=enforcing
改爲 SELINUX=disabledvim
3.編輯 hosts 文件
#服務端和客戶端都要配置
vi /etc/hosts
在裏面添加
192.168.1.123 saltstrack
192.168.1.124 clientcentos
4.添加epel源
#服務端和客戶端都要配置
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo網絡
5.安裝
yum -y install salt-master salt-minion 服務端
yum -y install salt-minion 客戶端ide
6.配置master
#服務端和客戶端都要配置
vi /etc/salt/minion
+16: master: 主機名/ip
+78: id: 主機名ui
7.服務端 啓動服務
systemctl enable salt-master
systemctl enable salt-minion
systemctl start salt-master
systemctl start salt-minionurl
8.客戶端 啓動服務
systemctl enable salt-minion
systemctl start salt-minion命令行
9.vim /etc/salt/minion 客戶端
添加 master: 服務端ip
id: 客戶端主機名rest
10.關閉防火牆
service firewalld stop 服務端
11.關閉SElinux
setenforce 0
12.重啓服務
systemctl restart salt-minion 客戶端
13.顯示全部公鑰
salt-key -L
14.接受全部等待的Key
salt-key -A
Proceed?[n/y] y
15.顯示全部公鑰
salt-key -L
16.檢測通信是否正常salt '*' test.ping