# unarchive task works with root user but fails with other users

**URL:** <https://forum.ansible.com/t/unarchive-task-works-with-root-user-but-fails-with-other-users/21138>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [April 12, 2016, 1:52pm UTC](https://forum.ansible.com/t/unarchive-task-works-with-root-user-but-fails-with-other-users/21138 "2016-04-12T13:52:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![noses](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@noses](https://forum.ansible.com/u/noses)\
**Post date:** [April 12, 2016, 1:52pm UTC](https://forum.ansible.com/t/unarchive-task-works-with-root-user-but-fails-with-other-users/21138/1 "2016-04-12T13:52:25Z")

</div>

Hi all,

I’m trying to run a playbook but I’m having some trouble.

If in the playbook I have:

- name: spark installation playbook  
hosts: SPARK  
become\_user: root  
become: yes  
vars:

spark\_folder\_name: “spark-1.6.0-bin-hadoop2.6”

tasks:

- name: unarchiving the zip file  
unarchive: src=./spark.tgz dest=./ copy=yes mode=0777

the task works.

But if instead I have the following in the playbook:

- name: spark installation playbook  
hosts: SPARK  
become\_user: ubuntu  
become: yes  
vars:

spark\_folder\_name: “spark-1.6.0-bin-hadoop2.6”

tasks:

- name: unarchiving the zip file  
unarchive: src=./spark.tgz dest=./ copy=yes mode=0777

Then the task fails and I get the following message:

TASK [unarchiving the zip file to target machine] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [VMSPARK]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: “dest ‘./’ must be an existing dir”}

How can I get the playbook to work with user ubuntu?

I have ssh key-enabled access to the server with user ubuntu, so accessing it is not the problem.

Any help will be much appreciated!  
Best regards,  
Noelia
