主机准备
主机类型 | 主机ip |
---|---|
ansible server | 192.168.1.5 |
client1 | 192.168.1.6 |
client2 | 192.168.1.7 |
检测python版本
python -V
配置yum源
cd /etc/yum.repos.d
vim yum.repo
[ansible]
name=ansible
baseurl=https://mirror.tuna.tsinghua.edu.cn/epel/7/x86_64/
gpgcheck=0
yum clean all
yum repolist
安装ansible
yum install ansible -y