Open iralance opened 7 years ago
rpm -Uvh http://mirrors.zju.edu.cn/epel/7/x86_64/e/epel-release-7-8.noarch.rpm 或者 yum install http://mirrors.sohu.com/fedora-epel/7/x86_64/a/ansible-2.3.1.0-1.el7.noarch.rpm yum install ansible
2.brew安装
brew install ansible
3.apt安装
apt-get install software-properties-common apt-add-repository ppa:ansible/ansible apt-get update apt-get install ansible
4.pip安装
sudo easy_install pip pip install ansible
编辑/etc/ansible/hosts文件,添加被管理的远程主机:
[merge] 103.242.0.51
上面操作完成后,服务器B先clone代码后,在服务器A执行即可实现批量更新
安装
2.brew安装
3.apt安装
4.pip安装
使用
编辑/etc/ansible/hosts文件,添加被管理的远程主机:
查看:
管理远程服务器:
自动化
上面操作完成后,服务器B先clone代码后,在服务器A执行即可实现批量更新
参考