Websoft9Archive / role_common

common role
Other
0 stars 5 forks source link

dkpg locked #12

Closed chendelin1982 closed 3 years ago

chendelin1982 commented 3 years ago

task

dkpg locked on Amazon Unbutnu20.04, need to retry it

chendelin1982 commented 3 years ago

add this task before apt install

- name: Check dpkg lock wait for Upgrade
  become: yes
  shell:  |
    while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 5; done;
    while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do sleep 5; done;

Done