Redhat8.5
一、前期准备
1.准备至少2台Linux主机
服务器主机名为server.example.com;
另一台主机名node1.example.com)
2.设置yum源,确保yum正常使用
3.下载epel包此处使用阿里云下载地址
yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
vim /etc/yum.repos.d/Centos-stream.repo
- [AppStream1]
- name=AppStream
- baseurl=https://mirrors.aliyun.com/centos/8-stream/AppStream/x86_64/os/
- gpgcheck=0
- [BaseOS1]
- name=BaseOS
- baseurl=https://mirrors.aliyun.com/centos/8-stream/BaseOS/x86_64/os/
- gpgcheck=0
4.安装ansible
yum install ansible -y
5.静态清单文件指定受管主机
1. 配置文件vim /etc/hosts