The async task did not return valid JSON: Extra data ...

164 views
Skip to first unread message

Nuriel Shem-Tov

unread,
Dec 11, 2015, 9:10:19 AM12/11/15
to Ansible Project
Hi!

I am running the following playbook:

---
- hosts: all
  remote_user
: root
  tasks
:

 
- name: simulate long running op (15 sec), wait for up to 45 sec, poll every 5 sec
    command
: /bin/sleep 15
    async
: 45
    poll
: 5


And it fails:

 
FAILED! => {"changed": false, "failed": true, "msg": "The async task did not return valid JSON: Extra data: line 2 column 1 - line 5 column 1 (char 115 - 244)"}

I am not sure what is going wrong, the playbook example is from http://docs.ansible.com/ansible/playbooks_async.html

Ansible version:
ansible 2.1.0 (devel bd0f9a4afc) last updated 2015/12/11 11:05:40 (GMT +000)
  lib
/ansible/modules/core: (detached HEAD 0e043f8c58) last updated 2015/11/26 10:11:24 (GMT +000)
  lib
/ansible/modules/extras: (detached HEAD e46e2e1d6f) last updated 2015/11/26 10:11:27 (GMT +000)
  config file
= /home/nuriel.shemtov/.ansible.cfg
  configured
module search path = Default w/o overrides


On Ubuntu
3.13.0-62-generic #102~precise1-Ubuntu SMP Wed Aug 12 14:09:54 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Remote host running Centos 5.5 ...

Any help is much appreciated!
Thanks

Nuriel Shem-Tov

unread,
Dec 16, 2015, 7:51:21 AM12/16/15
to Ansible Project
I just noticed that this works on ansible 1.9.4 (ubuntu), but not on: git source ansible ansible 2.1.0 (devel fcc9258b74) last updated 2015/12/16 10:47:18 (GMT +000)

Seth Alford

unread,
May 3, 2016, 5:08:29 PM5/3/16
to Ansible Project
I get the same error on ansible-2.0.1.0-2.el7.noarch running on a CentOS Linux release 7.2.1511 (Core) system attempting to run the playbook on a CentOS release 5.5 (Final) system.

--Seth
Reply all
Reply to author
Forward
0 new messages