实验环境
Centos 8 | Ansible | 192.168.141.165 |
---|---|---|
Centos 7 | 受管主机 | 192.168.141.164 |
Centos 7 | 受管主机 | 192.168.141.163 |
开启EPEL仓库
Ansible 包不在 Centos 8 默认的软件包仓库中。因此,我们需要执行以下指令开启EPEL仓库
先检查是否开启EPEL仓库,指令如下所示
dnf repolist epel
没有任何输出表示EPEL仓库未开启请执行下方命令开启EPLE仓库
dnf install epel-release -y
安装Ansible
开启EPEL仓库后安装Ansible
dnf -y install ansible
安装完成后修改Ansible的清单文件
vim