Skip to content

Commit 711f4dd

Browse files
committed
1 parent 48c5db7 commit 711f4dd

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tasks/main.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,11 @@
6060
name: "{{ base_git_rpms }}"
6161
state: present
6262
update_cache: yes
63-
register: network_access
64-
until: network_access is success
65-
retries: 10
63+
register: rhgit_install
64+
until: rhgit_install is success
65+
retries: 3
6666
delay: 2
67+
ignore_errors: true
6768
tags:
6869
- git
6970
- base_git
@@ -73,7 +74,7 @@
7374
src: "/opt/rh/{{ base_git }}/enable"
7475
path: /etc/profile.d/rh-git.sh
7576
state: link
76-
when: collections_enabled|bool and ansible_os_family == 'RedHat'
77+
when: base_git is defined and rhgit_install is success
7778
tags:
7879
- git
7980
- base_git
@@ -95,8 +96,8 @@
9596
- git
9697

9798
- name: Install Git from yum repo
98-
become: yes
99-
when: not collections_enabled|bool and ansible_os_family == 'RedHat'
99+
become: ye
100+
when: not collections_enabled|bool or rhgit_install is failed
100101
yum:
101102
name: git
102103
state: present

0 commit comments

Comments
 (0)