【问题标题】:System does not update Ansible on CentOS 8系统未在 CentOS 8 上更新 Ansible
【发布时间】:2021-12-29 08:57:13
【问题描述】:

我尝试安装 ansible-core,版本是 2.12。我正在按照文档安装它。

$ yum install epel-release
$ yum install ansible

但是,系统一直在安装 2.9.27 版本。

这真的让我很烦,因为我之前已经有过安装 ansible-core 的经验并且它确实有效。无论如何,我尝试在其他 CentOS 8 服务器上重新安装 ansible,安装过程与之前相同。

请告诉我如何安装最新版本或特定版本的 Ansible。

【问题讨论】:

标签: ansible yum


【解决方案1】:

您可以在此站点上查看最新版本的软件包:https://pkgs.org/search/?q=ansible

此时,最新的 ansible 包版本是 2.9.27。所以,你需要等到他们发布新版本或者考虑自己从源代码编译这个包。

【讨论】:

  • pip(3) install ansible 比从源代码获取要方便得多。
【解决方案2】:

但是,系统一直在安装 2.9.27 版本。

您正在从存储库安装 Ansible。这意味着有人打包了某个版本的 Ansible。

你的操作系统类似于 EL 8,the note on the website describes

Since Ansible 2.10 for RHEL is not available at this time, continue to use Ansible 2.9.

如何安装最新版本或特定版本的ansible

在安装python包时,不应该使用系统的包管理器,而是使用Pip。因此,作为 cmets 中已经给出的答案的一部分,您应该安装 Ansible via pip

$ dnf install epel-release -y ; dnf install python3-pip -y
$ python3 -m pip install ansible

您可以通过以下方式更新到最新版本:

$ python3 -m pip install ansible --upgrade

使用以下命令安装特定版本:

$ python3 -m pip install ansible==5.0.1

确保以与安装 Ansible 相同的方式安装 python 模块。

$ python3 -m pip install yamllint

【讨论】:

    【解决方案3】:

    试试

    sudo yum install ansible-2.12.1

    sudo yum install -

    希望这会奏效

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-04
      • 1970-01-01
      • 2023-03-20
      • 1970-01-01
      • 1970-01-01
      • 2022-06-23
      • 2017-12-20
      • 2020-10-31
      相关资源
      最近更新 更多