yum安裝ansible

甲骨文技術支援發表於2018-08-08

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)]


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20893244/viewspace-2199436/,如需轉載,請註明出處,否則將追究法律責任。