# apt-get update fails

**URL:** <https://forum.ansible.com/t/apt-get-update-fails/17898>\
**Category:** Ansible Developer\
**Tags:** ubuntu\
**Created:** [April 3, 2015, 1:08am UTC](https://forum.ansible.com/t/apt-get-update-fails/17898 "2015-04-03T01:08:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_Gertin](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@Tom\_Gertin](https://forum.ansible.com/u/Tom_Gertin)\
**Post date:** [April 3, 2015, 1:08am UTC](https://forum.ansible.com/t/apt-get-update-fails/17898/1 "2015-04-03T01:08:11Z")

</div>

```auto
I am trying to run an 'apt-get update' command in my Ansible playbook but it is failing everytime. 

I am using the 'apt: update_cache=yes' command found here: [http://docs.ansible.com/apt_module.html](http://docs.ansible.com/apt_module.html)

It returns the following error:

TASK: [update apt cache] ****************************************************** 
failed: [localhost] => {"failed": true}
msg: Could not fetch updated apt files

FATAL: all hosts have already failed -- aborting

I created an Ubuntu trusty machine using virtualbox and I installed Ansible on it and I am running the scripts on the VirtualBox. My repo, which contains my Ansible scripts is here: [https://github.com/d3netxer/ansible-osm-history-set-up](https://github.com/d3netxer/ansible-osm-history-set-up)

Thanks,

Tom

```

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [April 3, 2015, 1:23am UTC](https://forum.ansible.com/t/apt-get-update-fails/17898/2 "2015-04-03T01:23:23Z")

</div>

I think you probably want ansible-project for a larger audience, since this isn’t really a development question.
