加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

如何安装较旧的ansible包?

发布时间:2020-12-15 22:20:13 所属栏目:安全 来源:网络整理
导读:我需要安装ansible 2.1.0.0-1.el7.我的安装程序不适用于我安装的最新版本的ansible: yum -y --enablerepo=epel install ansible 这给了我ansible-2.2.0.0-3.el7.noarch.所以我试着列出旧版本,但我找不到它们: # yum -y --enablerepo=epel --showduplicates
我需要安装ansible 2.1.0.0-1.el7.我的安装程序不适用于我安装的最新版本的ansible:

yum -y --enablerepo=epel install ansible

这给了我ansible-2.2.0.0-3.el7.noarch.所以我试着列出旧版本,但我找不到它们:

# yum -y --enablerepo=epel --showduplicates list ansible
Failed to set locale,defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror2.hs-esslingen.de
 * epel: epel.mirrors.ovh.net
 * extras: it.centos.contactlab.it
 * updates: mirror.netcologne.de
Available Packages
ansible.noarch                    2.2.0.0-3.el7                                epel

This is a site我找到了多个版本,但我不知道如何安装它.

有人可以帮我安装我需要的Ansible版本吗?

解决方法

你应该用python pip安装它.

sudo yum install python-pip python-devel python

然后:

sudo pip install pip --upgrade
sudo pip install ansible==2.1.0.0

现在你应该可以使用:

ansible-playbook ...

如果你没有设法使用我给你的命令安装pip,请看一下:https://packaging.python.org/install_requirements_linux/

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读