From 711f4dd44b0bb89ea2e68a089fa67c23d87fa7b3 Mon Sep 17 00:00:00 2001 From: Bas Meijer Date: Thu, 10 Sep 2020 20:04:34 +0200 Subject: [PATCH] workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1877903 --- tasks/main.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 7c8453b..a1aa64f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -60,10 +60,11 @@ name: "{{ base_git_rpms }}" state: present update_cache: yes - register: network_access - until: network_access is success - retries: 10 + register: rhgit_install + until: rhgit_install is success + retries: 3 delay: 2 + ignore_errors: true tags: - git - base_git @@ -73,7 +74,7 @@ src: "/opt/rh/{{ base_git }}/enable" path: /etc/profile.d/rh-git.sh state: link - when: collections_enabled|bool and ansible_os_family == 'RedHat' + when: base_git is defined and rhgit_install is success tags: - git - base_git @@ -95,8 +96,8 @@ - git - name: Install Git from yum repo - become: yes - when: not collections_enabled|bool and ansible_os_family == 'RedHat' + become: ye + when: not collections_enabled|bool or rhgit_install is failed yum: name: git state: present