# archive:  "file.zip" does not exist

**URL:** <https://forum.ansible.com/t/archive-file-zip-does-not-exist/31664>\
**Category:** Ansible Project\
**Created:** [November 14, 2019, 10:17pm UTC](https://forum.ansible.com/t/archive-file-zip-does-not-exist/31664 "2019-11-14T22:17:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [November 14, 2019, 10:17pm UTC](https://forum.ansible.com/t/archive-file-zip-does-not-exist/31664/1 "2019-11-14T22:17:36Z")

</div>

I have the following:

`

- name: Compress reports  
archive:  
path: “{{ final\_location }}/{{ host }}\_reports”  
#dest: “{{ final\_location }}/{{ host }}\_reports.zip”  
format: zip

`

It returns this:

`

TASK [LookingGlass : Compress reports] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [3.224.151.99]: FAILED! =\> {“changed”: false, “msg”: “path /Users/joharmon/Desktop/LookingGlass\_Reports\_2019-11-14/wargames\_reports.zip does not exist”, “path”: “/Users/joharmon/Desktop/LookingGlass\_Reports\_2019-11-14/wargames\_reports.zip”}  
fatal: [3.225.174.116]: FAILED! =\> {“changed”: false, “msg”: “path /Users/joharmon/Desktop/LookingGlass\_Reports\_2019-11-14/wargames\_reports.zip does not exist”, “path”: “/Users/joharmon/Desktop/LookingGlass\_Reports\_2019-11-14/wargames\_reports.zip”}  
fatal: [3.220.214.197]: FAILED! =\> {“changed”: false, “msg”: “path /Users/joharmon/Desktop/LookingGlass\_Reports\_2019-11-14/wargames\_reports.zip does not exist”, “path”: “/Users/joharmon/Desktop/LookingGlass\_Reports\_2019-11-14/wargames\_reports.zip”}

`

Am I using this wrong?? If I declare a dest it also fails: ie

`  
dest: “{{ final\_location }}/{{ host }}\_reports.zip”

`

---

<div class="post-metadata">

**Author:** ![sdoran](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@sdoran](https://forum.ansible.com/u/sdoran)\
**Post date:** [November 15, 2019, 3:27pm UTC](https://forum.ansible.com/t/archive-file-zip-does-not-exist/31664/2 "2019-11-15T15:27:19Z")

</div>

John,

The value for path must exist on the remote machine. Does /Users/joharmon/Desktop/LookingGlass\_Reports\_2019-11-14/wargames\_reports exist on the remote machine? This looks like a path that may be on the control machine.

---

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [November 15, 2019, 4:37pm UTC](https://forum.ansible.com/t/archive-file-zip-does-not-exist/31664/3 "2019-11-15T16:37:43Z")

</div>

No, it doesn’t. It is on my laptop. Was hoping to zip it up locally

---

<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 15, 2019, 4:40pm UTC](https://forum.ansible.com/t/archive-file-zip-does-not-exist/31664/4 "2019-11-15T16:40:37Z")

</div>

Then you need to set your playbook to localhost or set delegate\_to: localhost  
on the task.

---

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [November 15, 2019, 4:42pm UTC](https://forum.ansible.com/t/archive-file-zip-does-not-exist/31664/5 "2019-11-15T16:42:35Z")

</div>

DOH! I forgot to add that… Thank you!
