When running ansible v1.8.2, in the below playbook, to_json fails to handle 
a basic variable

- name: a play that runs entirely on the ansible host
  hosts: localhost
  vars:
     users:
       - bob
       - joe
  tasks:
    # no problem
    - debug: msg="{{users|to_yaml}}"
    # ERROR: an unexpected type error occurred. Error was Undefined is not 
JSON serializable
    - debug: msg="{{users|to_json}}"


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/500738de-f4f1-4876-b6ca-5b37d1a81b64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to