get_url throws No space left error

2,401 views
Skip to first unread message

rambius

unread,
Sep 7, 2017, 11:39:45 AM9/7/17
to Ansible Project
Hello,

I have the following playbook:

---
- name: Setup Upsource
  hosts: upsource
  tasks:
  - name: fetch upsource
    local_action: get_url url="{{ upsource_url }}" dest="{{ installers_dir }}/{{ upsource_bundle }}" validate_certs="no"
  - name: create upsource directory
    file: path="{{ upsource_basedir }}" state=directory
  - name: extract upsource
    unarchive: src="{{ installers_dir }}/{{ upsource_bundle }}" dest="{{ upsource_basedir }}" creates="{{ upsource_extractdir }}"

When I run it get_url fails with  No space left on device error:

$ ansible-playbook -i ../hosts site.yml 

PLAY [Setup Upsource] **********************************************************

TASK [setup] *******************************************************************
ok: [upsource]

TASK [fetch upsource] **********************************************************
fatal: [upsource -> localhost]: FAILED! => {"changed": false, "failed": true, "msg": "failed to create temporary content file: [Errno 28] No space left on device"}
        to retry, use: --limit @/home/user/tools/playbooks/upsource/site.retry

PLAY RECAP *********************************************************************
upsource                 : ok=1    changed=0    unreachable=0    failed=1   


I double checked the space available and my hypothesis is that /tmp partition may be too small. Does ansible use /tmp when downloading files? Can I point it to some other directory? When I call wget directly I am able to download the file, so I have enough disk space.

  - name: fetch upsource
    local_action: "command wget {{ upsource_url }} -O {{ installers_dir }}/{{ upsource_bundle }} creates={{ installers_dir }}/{{ upsource_bundle }}"


Any hints how to fix that issue? Thank you in advance.

Regards
rambius

Jean-Yves LENHOF

unread,
Sep 7, 2017, 12:14:44 PM9/7/17
to ansible...@googlegroups.com
Hi,

RTFM http://docs.ansible.com/ansible/latest/get_url_module.html

tmp_dest is what you are looking for

Regards,

JYL

rambius

unread,
Sep 7, 2017, 1:35:51 PM9/7/17
to Ansible Project


четвъртък, 7 септември 2017 г., 12:14:44 UTC-4, Jean-Yves LENHOF написа:

Hi,

RTFM http://docs.ansible.com/ansible/latest/get_url_module.html

tmp_dest is what you are looking for
Thank you! tmp_dest fixed the problem..

Regards
Ivan
Reply all
Reply to author
Forward
0 new messages