Ansible 1.9.4 : Failed to lock apt for exclusive operation

前端 未结 8 2588
庸人自扰
庸人自扰 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:02

    On my hosts file, I have some hosts that use a different user for sudo than the one Ansible uses for SSH so I had ansible_user and ansible_become_user specified for every host in the inventory.

    In those hosts where ansible_user == ansible_become_user I got Failed to lock apt for exclusive operation.

    The solution for me was to remove ansible_become_user line for those cases where the user is the same in both parameters.

提交回复
热议问题