Ansible 1.9.4 : Failed to lock apt for exclusive operation

前端 未结 8 2463
庸人自扰
庸人自扰 2021-02-18 15:23

I bumped into Failed to lock apt for exclusive operation issue: https://github.com/geerlingguy/ansible-role-apache/issues/50

I posted a lot of details in Gi

8条回答
  •  眼角桃花
    2021-02-18 16:15

    I know this question has been answered a long time ago, but for me, the solution was different. The problem was the update_cache step. I had this with every install step, and somehow that caused the "apt failed lock error". the solution was adding the update_cache as a seperate step, like so:

    - tasks:
      - name: update apt list
        apt:
          update_cache: yes
    

提交回复
热议问题