Retry apt cache update

This task is causing some test failures from time
to time. Implementing a retry should help to reduce
transient failures.

Change-Id: I2a71b9f5d8af4ada504072f9236f49be52eafee8
(cherry picked from commit 7d3fe3f56c)
This commit is contained in:
Jesse Pretorius 2017-11-18 12:55:30 +00:00 committed by Jesse Pretorius (odyssey4me)
parent af9bc30ed3
commit 9e38718554

View File

@ -16,5 +16,9 @@
- name: First ensure apt cache is always refreshed - name: First ensure apt cache is always refreshed
apt: apt:
update_cache: true update_cache: true
register: _update
retries: 5
delay: 2
until: _update | succeeded
when: when:
- ansible_pkg_mgr == 'apt' - ansible_pkg_mgr == 'apt'