Skip to content

Commit

Permalink
retry apt update
Browse files Browse the repository at this point in the history
  • Loading branch information
xpillons committed Apr 22, 2024
1 parent 851a831 commit af60421
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions playbooks/roles/pkg_update/tasks/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@
ansible.builtin.apt:
name: "*"
state: latest
# https://github.com/ansible/ansible/issues/51663
# There has been an intermittent issue with this task where it would fail and print the error:
#
# Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process
# using it?
#
# The reason for this is unclear. It's not from unattended-upgrades as that has already been
# uninstalled when creating the base image. The workaround for now is to simply retry this task
# several times in the event that it fails, with a small delay between each attempt.
register: result
until: result is not failed
retries: 5
delay: 15

- name: Check if reboot is required
stat:
Expand Down

0 comments on commit af60421

Please sign in to comment.