自动化安装saltstack脚本
一、install_salt-master.sh
#!/bash/sh #Function: install salt-master echo "##########close selinux########## " sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config setenforce 0 systemctl stop firewalld.service systemctl disable firewalld.service sleep 5 echo "##########install salt-master###########" dnf install salt-master -y sed -i 's/#interface: 0.0.0.0/interface: 192.168.141.100/g' /etc/salt/master sed -i 's/#auto_accept: False/auto_accept: True/g' /etc/salt/master echo "##########start salt-master service##########" systemctl enable salt-master systemctl start salt-master systemctl status salt-master
二、install_salt-minion.sh
#!/bash/sh #Install salt-minion script at 2018-4-12 dnf install salt-minion -y sed -i 's/#master: salt/master: 192.168.141.100/g' /etc/salt/minion sed -i 's/#id:/id: controller2/g' /etc/salt/minion systemctl enable salt-minion systemctl start salt-minion systemctl status salt-minion sleep 5 echo "#######remove python2-tornado########" rpm -e python2-tornado --nodeps sleep 2 dnf install http://mirror.centos.org/centos/7/cloud/x86_64/openstack-ocata/common/python2-tornado-4.4.2-2.el7.x86_64.rpm -y sleep 5 echo "#######restart service#########" systemctl restart salt-minion systemctl status salt-minion
三、中心云规划
中心云ip:192.168.141.100
ha_VIP:192.168.141.103
主控 --->主 IP: 192.168.141.101
主控 --->备 IP: 192.168.141.102