rsync排除临时目录

This commit is contained in:
zhanglikun 2023-09-13 23:01:30 +08:00
parent bbbd442dae
commit ae7e5fe0fc

View File

@ -19,9 +19,9 @@ sed -e "s/__MASTER1__/${MASTER1}/g" \
-i keepalived/*.conf -i keepalived/*.conf
# 分发仓库文件 # 分发仓库文件
rsync -avz * root@${MASTER1}:/tmp/ rsync -avz --exclude=temp * root@${MASTER1}:/tmp/
rsync -avz * root@${MASTER2}:/tmp/ rsync -avz --exclude=temp * root@${MASTER2}:/tmp/
rsync -avz * root@${MASTER3}:/tmp/ rsync -avz --exclude=temp * root@${MASTER3}:/tmp/
# keepalived 配置 # keepalived 配置
ssh root@${MASTER1} "cd /tmp/keepalived/ && bash install.sh && cp -r keepalived1.conf /etc/keepalived/keepalived.conf && systemctl restart keepalived" ssh root@${MASTER1} "cd /tmp/keepalived/ && bash install.sh && cp -r keepalived1.conf /etc/keepalived/keepalived.conf && systemctl restart keepalived"