# {"failed": true} msg: Failed to lock apt for exclusive operation  FATAL: all hosts have already failed -- aborting

**URL:** <https://forum.ansible.com/t/failed-true-msg-failed-to-lock-apt-for-exclusive-operation-fatal-all-hosts-have-already-failed-aborting/19341>\
**Category:** Ansible Project\
**Created:** [September 23, 2015, 3:06pm UTC](https://forum.ansible.com/t/failed-true-msg-failed-to-lock-apt-for-exclusive-operation-fatal-all-hosts-have-already-failed-aborting/19341 "2015-09-23T15:06:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DEBORAH\_AKUOKO](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@DEBORAH\_AKUOKO](https://forum.ansible.com/u/DEBORAH_AKUOKO)\
**Post date:** [September 23, 2015, 3:06pm UTC](https://forum.ansible.com/t/failed-true-msg-failed-to-lock-apt-for-exclusive-operation-fatal-all-hosts-have-already-failed-aborting/19341/1 "2015-09-23T15:06:37Z")

</div>

I get the error ({“failed”: true} msg: Failed to lock apt for exclusive operationFATAL: all hosts have already failed – aborting)

as specified in the subject each time i run my playbook.

But i can successfully ssh into the remote host

this is the content of my playbook

- hosts: 172.30.0.12  
roles:
- java
- tomcat

# sudo: True

vars:  
tomcat\_version: 7  
java\_version: 7  
tomcat\_jmxremote\_enable: true  
tomcat\_jmxremote\_port: 10003

Kindly help me figure this out

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [September 23, 2015, 5:11pm UTC](https://forum.ansible.com/t/failed-true-msg-failed-to-lock-apt-for-exclusive-operation-fatal-all-hosts-have-already-failed-aborting/19341/2 "2015-09-23T17:11:57Z")

</div>

unless you are running as root I would expect this error, you might  
want to uncomment #sudo: True
