找不到与“ git2u”匹配的软件包,没有安装或更新

时间:2020-07-28 10:00:46

标签: ansible centos7

我正在尝试在现有节点上运行Ansible,但在除能正常工作的节点之外的所有节点上都遇到错误:

错误消息:

No package matching 'git2u' found available, installed, or updated.

所有节点都是CentOS 7。

我在做什么错了?

与我在终端上使用yum时相同:

yum info git2u
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror, langpacks, ps
Loading mirror speeds from cached hostfile
 * epel: d2lzkl7pfhq30w.cloudfront.net
Error: No matching Packages to list

我的剧本:

- name: install epel7 and ius-release to install latest git
  package:
    name:
    - epel-release
    - 'https://repo.ius.io/ius-release-el7.rpm'
    state: present
  when: ansible_distribution == 'CentOS'

- name: install git2u
  package:
    name: git2u
    state: present
  when: ansible_distribution == 'CentOS'

1 个答案:

答案 0 :(得分:1)

git2u pacakge是renamed to git216,后来是retired。如果您使用IUS,我强烈建议您注意announce repository,以便在退包时得到通知。

https://ius.io/faq#how-do-i-know-when-an-ius-package-is-being-retired