问题:
[root@ansible ~]# yum -y install ansible Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com base | 3.6 kB 00:00:00 extras | 2.9 kB 00:00:00 updates | 2.9 kB 00:00:00 No package ansible available. Error: Nothing to do
首先我们先安装yum源(我用的是阿里源centos镜像-centos下载地址-centos安装教程-阿里巴巴开源镜像站)
因为Ansible是属于Extra Packages for Enterprise Linux (EPEL)库的一部分,下载阿里源之后还要安装EPEL
[root@ansible ~]# yum install epel-release [root@ansible ~]# yum repolist [root@ansible ~]# yum -y install ansible [root@ansible ~]# which ansible /usr/bin/ansible
到此安装成功!



