# Erro Playbook to Update

**URL:** <https://forum.ansible.com/t/erro-playbook-to-update/28975>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [November 8, 2018, 10:44am UTC](https://forum.ansible.com/t/erro-playbook-to-update/28975 "2018-11-08T10:44:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adelmo\_Silva](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@Adelmo\_Silva](https://forum.ansible.com/u/Adelmo_Silva)\
**Post date:** [November 8, 2018, 10:44am UTC](https://forum.ansible.com/t/erro-playbook-to-update/28975/1 "2018-11-08T10:44:17Z")

</div>

Good morning, my friends.

I’m having an error happening on Ansible when I run the playbook below:

- hosts: all  
become: yes  
become\_method: sudo  
become\_user: ansible  
gather\_facts: yes  
tasks:
- name: Installing Updates Ubuntu Servers  
apt:  
update\_cache: true

This error appears:  
fatal: [192.168.0.82]: FAILED! = “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” \ nW: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied) \ nE: Unable to lock directory / var / lib / apt / lists /cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied) “,” rc “: 100,” stderr “:” E: Could not open lock file / var / lib / apt / : Permission denied) \ nE: Unable to lock directory / var / lib / apt / lists / \ nW: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied) \ nW: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied) \ n “,” stderr\_lines “: [” E: Could not open lock file / var / lib / apt / 13: Permission denied “,” E: Unable to lock directory / var / lib / apt / lists / “,” W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied) “,” W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied) “,” stdout “:” Reading package lists … \ n “,” stdout\_lines “: [” Reading package lists … "]}

I need to deploy on a server network with the same configuration as this one. Can you help me please?

---

<div class="post-metadata">

**Author:** ![Adelmo\_Silva](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@Adelmo\_Silva](https://forum.ansible.com/u/Adelmo_Silva)\
**Post date:** [November 8, 2018, 10:46am UTC](https://forum.ansible.com/t/erro-playbook-to-update/28975/2 "2018-11-08T10:46:50Z")

</div>

Sorry.

Corret Mensage error:

fatal: [192.168.0.82]: FAILED! =\> {“changed”: false, “cmd”: “apt-get update”, “msg”: “E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)\nE: Unable to lock directory /var/lib/apt/lists/\nW: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)\nW: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)”, “rc”: 100, “stderr”: “E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)\nE: Unable to lock directory /var/lib/apt/lists/\nW: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)\nW: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)\n”, “stderr\_lines”: [“E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)”, “E: Unable to lock directory /var/lib/apt/lists/”, “W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)”, “W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)”], “stdout”: “Reading package lists…\n”, “stdout\_lines”: [“Reading package lists…”]}

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [November 9, 2018, 5:17am UTC](https://forum.ansible.com/t/erro-playbook-to-update/28975/3 "2018-11-09T05:17:04Z")

</div>

You have become\_user ansible, only root user is allowed to install packages.

---

<div class="post-metadata">

**Author:** ![Adelmo\_Silva](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@Adelmo\_Silva](https://forum.ansible.com/u/Adelmo_Silva)\
**Post date:** [November 9, 2018, 8:02am UTC](https://forum.ansible.com/t/erro-playbook-to-update/28975/4 "2018-11-09T08:02:12Z")

</div>

> My friend, thank you very much. Run as root(same password on client e server).

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [November 10, 2018, 9:12am UTC](https://forum.ansible.com/t/erro-playbook-to-update/28975/5 "2018-11-10T09:12:36Z")

</div>

> \>  
> \> My friend, thank you very much. Run as root(same password on client e  
> \> server).  
> \>
> 
> \> this message is displayed:

Have you read the message?  
It clearly states what's wrong.

> \> fatal: [192.168.0.82]: FAILED! =\> {"changed": false, "cmd": "apt-get  
> \> update", "msg": "W: GPG error: [https://dl.bintray.com/wso2/deb](https://dl.bintray.com/wso2/deb) ei\_640  
> \> Release: The following signatures couldn't be verified because the public  
> \> key is not available: NO\_PUBKEY 379CE192D401AB61\nE: The repository '  
> \> [https://dl.bintray.com/wso2/deb](https://dl.bintray.com/wso2/deb) ei\_640 Release' is not signed.", "rc":

This isn't an Ansible problem at all since you are missing gpg key for some repositories.
