Skip to content

Commit a9f2770

Browse files
committed
Add task to wait for apt locks to be released before updating cache
1 parent 7d1dfa9 commit a9f2770

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

roles/common/tasks/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
---
2+
- name: Wait for apt locks to be released
3+
shell: while fuser /var/lib/dpkg/lock-frontend /var/lib/apt/lists/lock /var/cache/apt/archives/lock >/dev/null 2>&1; do sleep 5; done
4+
changed_when: false
5+
timeout: 300
6+
27
- name: Update apt cache
38
apt:
49
update_cache: yes

0 commit comments

Comments
 (0)