Why does my Ansible playbook fail when using copy module even when I have enough space on the target

Solution In Progress - Updated -

Issue

When executing a task within a playbook to transfer a large file to a target, the file is "staged" on the target in a location specified by remote_tmp. However, the remote_tmp location is not ideal because it is small and cannot accomodate the file.

This failure will be similar to the following the first time:

 [WARNING]: sftp transfer mechanism failed on [192.168.1.2]. Use
ANSIBLE_DEBUG=1 to see detailed information

 [WARNING]: scp transfer mechanism failed on [192.168.1.2]. Use
ANSIBLE_DEBUG=1 to see detailed information

fatal: [192.168.1.2]: UNREACHABLE! => {"changed": false, "msg": "SSH Error: data could not be sent to remote host \"192.168.1.2\". Make sure this host can be reached over ssh", "unreachable": true}

But if the same task is attempted again (without freeing up any space) the message will indicate that there is no space left:

fatal: [192.168.1.2]: UNREACHABLE! => {"changed": false, "msg": "mkdir: cannot create directory ‘/home/ansible/.ansible/tmp/ansible-tmp-1537286773.26-148814310001979’: No space left on device\n", "unreachable": true}

Environment

  • Red Hat Ansible Engine
    • 2.4+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content