0

I'm trying to run Ansible on my existing nodes and I'm getting errors on all of the nodes except one on which it works fine:

The error message:

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

All of the nodes are CentOS 7.

What am I doing wrong?

Same when I'm using yum from the terminal:

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

My playbook:

- 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'
  • 3
    your ansible is correct, the package or the way you install the package might be wrong. It would be helpful if you can list the commands to install the package in centos bash. Maybe https://stackoverflow.com/questions/21820715/how-to-install-latest-version-of-git-on-centos-7-x-6-x/33439452 can help. – user2599522 Jul 28 '20 at 10:15

1 Answers1

2

The git2u pacakge was renamed to git216, which was later retired. If you use IUS I highly recommend watching the announce repository to be notified when packages are retired.

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

carlwgeorge
  • 627
  • 5
  • 13