Skip to content

Commit c16bd62

Browse files
Delete Lock file before update
1 parent 8a47e76 commit c16bd62

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

playbooks/roles/fix_broken/tasks/ubuntu.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@
7272
delay: 10
7373
until: result.stdout | int == 0
7474

75+
- name: Ensure lock file is removed
76+
become: true
77+
file:
78+
path: "/var/lib/apt/lists/lock"
79+
state: absent
80+
retries: 30
81+
delay: 10
82+
until: result.stdout | int == 0
7583

7684
- name: Run apt-get update
7785
become: true
@@ -80,7 +88,6 @@
8088
PID1=$!
8189
wait $PID1
8290
83-
8491
- name: Run fix-broken
8592
become: true
8693
shell: |

0 commit comments

Comments
 (0)