Ansible playbook 实战 - 02
Ansible playbook 实战
一、基础准备
主机 | 外网 | 内网 | 部署服务 |
---|---|---|---|
m01 | 192.168.15.161 | 172.16.1.161 | ansible |
lb01 | 192.168.15.105 | 172.16.1.105 | nginx |
web01 | 172.16.1.107 | nginx+php+rpcbind | |
web02 | 172.16.1.108 | nginx+php+rpcbind | |
db01 | 172.16.1.151 | mariadb | |
nfs | 172.16.1.131 | nfs+rpcbind+inotify+sersync | |
backup | 172.16.1.141 | rsync |
1.安装ansible
[root@m01 ~]# yum install -y ansible
2.配置ansible
[root@m01 ~]# vim /etc/ansible/ansible.cfg
host_key_checking