ansible - 如何安装旧版本的ansible?

标签 ansible rpm yum

我需要安装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/

关于ansible - 如何安装旧版本的ansible?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40661622/

相关文章:

ansible - 如何将 'skip: true' 与 'with_first_found' 一起使用?

linux - 在 RPM 中创建符号链接(symbolic link)

deployment - 使用yum组织和部署相关组件子系统的发布的方法

java - 使用 yum 在 CentOS 上安装 OpenJDK 11

ansible - 使用 ansible playbook 检查嵌套数据结构中的给定字符串

vagrant - 使用 Vagrant 和 Ansible 在本地主机上运行任务

Ansible 注册多个命令的结果

linux - 我可以在没有预先存在的源文件的情况下创建包吗?

python - 在 Fedora 中使用 pip 或 dnf 安装 python 包?

gitlab - 更改存储库后,Puppet 不更新包