yum如何安装ansible
更新:HHH   时间:2023-1-7


这篇文章将为大家详细讲解有关yum如何安装ansible,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

os版本:

[root@iz2zecm5evly3vhbie5ik4z ~]# cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core)

查看数据源

[root@oraclerac1 ~]# cd /etc/yum.repos.d/
[root@oraclerac1 yum.repos.d]# ls -ltr
total 8
-rw-r--r-- 1 root root 230 Jul 23 11:22 epel.repo
-rw-r--r-- 1 root root 675 Jul 23 11:22 CentOS-Base.repo

如果没有epel数据源的话,按照如下安装

rpm -Uvh ftp://bo.mirror.garr.it/1/slc/centos/7.0.1406/extras/x86_64/Packages/epel-release-7-5.noarch.rpm

安装

yum install ansibel

查看版本

root@iz2zecm5evly3vhbie5ik4z ~]# ansible --version
ansible 2.6.2
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Nov  6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]

关于“yum如何安装ansible”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。

返回网络管理教程...