- 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)}}"
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\" "}failed_when: ansible_version.full | version_compare('2.0.0.0', operator='lt', strict=False)
I'll get this 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 %}"}