# File copy fails with large file

**URL:** <https://forum.ansible.com/t/file-copy-fails-with-large-file/26803>\
**Category:** Ansible Project\
**Created:** [February 20, 2018, 5:07pm UTC](https://forum.ansible.com/t/file-copy-fails-with-large-file/26803 "2018-02-20T17:07:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeamHall](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/leamhall/32/9390_2.png) [@LeamHall](https://forum.ansible.com/u/LeamHall)\
**Post date:** [February 20, 2018, 5:07pm UTC](https://forum.ansible.com/t/file-copy-fails-with-large-file/26803/1 "2018-02-20T17:07:32Z")

</div>

| 
# Outside of Ansible, the user ansible can scp the file in 52 seconds.
 |
|
| |

| |
|
| |

| 
# Using Ansible, even after upping the timeout to 105 seconds per [ERROR! Timeout (12s) waiting for privilege escalation prompt: · Issue #14426 · ansible/ansible · GitHub](https://github.com/ansible/ansible/issues/14426)
 |
|
| |

| 
# the copy fails with:
 |
|
| |

| |
|
| |

| 

fatal: [psalms]: FAILED! =\> {“failed”: true, “msg”: "Timeout (105s) waiting for privilege escalation prompt: "}

 |
|
| |

| 
# Changing the playbook to copy a smaller file, the CentOS-6\_minimal.iso, works.
 |
|
| |

| 
# Ansible version info
 |
|
| |

| 

ansible 2.4.1.0

 |
|
| |

| 

config file = /etc/ansible/ansible.cfg

 |
|
| |

| 

configured module search path = [u’/home/ansible/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]

 |
|
| |

| 

ansible python module location = /usr/lib/python2.6/site-packages/ansible

 |
|
| |

| 

executable location = /usr/bin/ansible

 |
|
| |

| 

python version = 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]

 |
|
| |

| |
|
| |

| 
# iso\_dir is /opt/iso, with mode 0775 and the user is in the directory’s group.
 |
|
| |

| |
|
| |

| 
# Playbook stanza
 |
|
| |

| 
- name: copy\_iso

 |
|
| |

| 

copy:

 |
|
| |

| 

src: “{{ iso\_dir }}/{{ item }}”

 |
|
| |

| 

dest: “{{ iso\_dir }}/{{ item }}”

 |
|
| |

| 

mode: 0664

 |
|
| |

| 

owner: root

 |
|
| |

| 

group: syseng

 |
|
| |

| 

with\_items:

 |
|
| |

| 
- CentOS-6.9-x86\_64-bin-DVD1.iso

 |
|
| |

# Error:

TASK [copy\_ssh\_key] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [psalms]

TASK [copy\_iso] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
[WARNING]: sftp transfer mechanism failed on [psalms]. Use ANSIBLE\_DEBUG=1 to see detailed information

[WARNING]: scp transfer mechanism failed on [psalms]. Use ANSIBLE\_DEBUG=1 to see detailed information

fatal: [psalms]: FAILED! =\> {“failed”: true, “msg”: "Timeout (105s) waiting for privilege escalation prompt: "}  
to retry, use: --limit @/home/ansible/lang/git/Ansible\_Test/playbooks/create\_virt\_host.retry

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
psalms : ok=16 changed=3 unreachable=0 failed=1
