# Unable to copy file at remote location through awx

**URL:** <https://forum.ansible.com/t/unable-to-copy-file-at-remote-location-through-awx/32677>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [April 14, 2020, 1:31pm UTC](https://forum.ansible.com/t/unable-to-copy-file-at-remote-location-through-awx/32677 "2020-04-14T13:31:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rishabh\_gupta](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@rishabh\_gupta](https://forum.ansible.com/u/rishabh_gupta)\
**Post date:** [April 14, 2020, 1:31pm UTC](https://forum.ansible.com/t/unable-to-copy-file-at-remote-location-through-awx/32677/1 "2020-04-14T13:31:16Z")

</div>

##### ISSUE TYPE

FIle is not copying to remote location

Any help will be much appreciated.

I tried ping module for the same host and it is working fine.

##### SUMMARY

I am trying to copy a file to a remote host. However, it seems awx is looking for it in temporary directory which it creates during the processing. I am pulling the playbook from Git.

# **awx 10**

**python 3.6**  
**ansible 2.9**  
**linux 7.6** - name: copy file  
hosts: all  
tasks:

- name: Copy file  
copy:  
src: /tmp/testcopy.txt  
dest: /home/rishabh

---

<div class="post-metadata">

**Author:** ![Nathan\_Brady](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/nathan_brady/32/8422_2.png) [@Nathan\_Brady](https://forum.ansible.com/u/Nathan_Brady)\
**Post date:** [April 14, 2020, 2:22pm UTC](https://forum.ansible.com/t/unable-to-copy-file-at-remote-location-through-awx/32677/2 "2020-04-14T14:22:20Z")

</div>

That is a feature, not an issue. You can disable job isolation in the settings, but it would be more secure to modify the playbook so it doesn’t need to break the isolation.

---

<div class="post-metadata">

**Author:** ![Bill\_Nottingham1](https://avatars.discourse-cdn.com/v4/letter/b/58f4c7/32.png) [@Bill\_Nottingham1](https://forum.ansible.com/u/Bill_Nottingham1)\
**Post date:** [April 14, 2020, 2:25pm UTC](https://forum.ansible.com/t/unable-to-copy-file-at-remote-location-through-awx/32677/3 "2020-04-14T14:25:03Z")

</div>

rishabh gupta (rishabhgupta1608@gmail.com) said:

> ISSUE TYPE
> 
> FIle is not copying to remote location
> 
> Any help will be much appreciated.
> 
> I tried ping module for the same host and it is working fine.  
> SUMMARY
> 
> I am trying to copy a file to a remote host. However, it seems awx is  
> looking for it in temporary directory which it creates during the  
> processing.

Playbooks are isolated from each other, each has their own /tmp.

I'd suggest putting the file you're copying in the source control, or  
on some other file server/storage with a well known path, rather than trying  
to stage it in /tmp.

Bill

---

<div class="post-metadata">

**Author:** ![Micah\_Joiner](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Micah\_Joiner](https://forum.ansible.com/u/Micah_Joiner)\
**Post date:** [April 14, 2020, 2:41pm UTC](https://forum.ansible.com/t/unable-to-copy-file-at-remote-location-through-awx/32677/4 "2020-04-14T14:41:14Z")

</div>

[https://docs.ansible.com/ansible/latest/modules/copy\_module.html](https://docs.ansible.com/ansible/latest/modules/copy_module.html)

The ansible copy command goes through the standard directory checks. Generally i put the file in the /files directory and it works without a problem. Where is the file located you are trying to copy?

If it is on the remote source you can use the **remote\_src** option.

If it is a URL then you will need to use the get URL option [https://docs.ansible.com/ansible/latest/modules/get\_url\_module.html](https://docs.ansible.com/ansible/latest/modules/get_url_module.html)
