Issue 1:
My original task looked like this:

- name: "Check Ansible version"
run_once: true
debug: msg="You need at least version 2.0.0.0, currently using version {{ ansible_version.full }}"
failed_when: "{{ ansible_version.full | version_compare('2.0.0.0', operator='lt', strict=False)}}"

and that results in The conditional check '{{ ansible_version.full|version_compare(\"2.0.0.0\" ' failed. The error was: template error while templating string: unexpected end of template, expected ','.. String: {{ ansible_version.full|version_compare(\"2.0.0.0\" "}

Following advise from Brian in the forum I changed the condition to failed_when: ansible_version.full | version_compare('2.0.0.0', operator='lt', strict=False) which then throws a different error The error was: template error while templating string: unexpected '}', expected ')'. String: {% if ansible_version.full|version_compare('2.0.0.0' %} True {% else %} False {% endif %}"}

Looks like a bug to me, isn't it?

Issue 2:
ISSUE TYPE

Bug Report

ANSIBLE VERSION

ansible 2.0.2.0
config file = /home/sfox/.ansible.cfg
configured module search path = /home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/library

CONFIGURATION

library = /home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/library
forks = 20
sudo_flags = -H -i
jinja2_extensions = jinja2.ext.do,jinja2.ext.i18n,jinja2.ext.loopcontrols,jinja2.ext.with_
ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
action_plugins = /usr/share/ansible_plugins/action_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/action
callback_plugins = /usr/share/ansible_plugins/callback_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/callback
connection_plugins = /usr/share/ansible_plugins/connection_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/connection
lookup_plugins = /usr/share/ansible_plugins/lookup_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/lookup
vars_plugins = /usr/share/ansible_plugins/vars_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/vars
filter_plugins = /usr/share/ansible_plugins/filter_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/filter
nocows = 1

OS / ENVIRONMENT

From: Fedora 23

Managing: Ubuntu Trusty (14.04)

SUMMARY

I can no longer specify lists or tuples in a failed_when statement like I could with 1.9.x

STEPS TO REPRODUCE

Using this inventory file

test_host ansible_host=10.0.0.208

and this playbook

- name: My Playbook
hosts: test_host
gather_facts: no

tasks:
- shell: ls pants
register: result
failed_when: result.rc not in [0, 1]
#failed_when: "result.rc not in [0, 1]"
#failed_when: result.rc not in (0, 1)

I cannot get Ansible to execute this with or without quotes. Both lists and tuples worked previously.

EXPECTED RESULTS

PLAY [My Playbook] ************************************************************

TASK: [shell ls pants] ********************************************************
failed: [test_host] => {"changed": true, "cmd": "ls pants", "delta": "0:00:00.003004", "end": "2016-04-05 16:29:21.478688", "failed": true, "failed_when_result": true, "rc": 2, "start": "2016-04-05 16:29:21.475684", "stdout_lines": [], "warnings": []}
stderr: ls: cannot access pants: No such file or directory

FATAL: all hosts have already failed -- aborting

ACTUAL RESULTS

PLAY [My Playbook] *************************************************************

TASK [command] *****************************************************************
fatal: [test_host]: FAILED! => {"failed": true, "msg": "The conditional check 'result.rc not in [0' failed. The error was: template error while templating string: unexpected '}', expected ']'. String: {% if result.rc not in [0 %} True {% else %} False {% endif %}"}

NO MORE HOSTS LEFT *************************************************************