I want to make a decision in a template using the version_compare filter:

    {% if httpd_version|version_compare('2.4', '>=') %}

This fails with the message "{'msg': "TypeError: 'in <string>' requires 
string as left operand", 'failed': True}".

The variable 'httpd_version' contains the installed version of Apache on 
the host.  I derived that by using a shell task in the playbook to extract 
the version and then using set_fact to store it.  What is the proper method 
of testing the version in a template?

-- 
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/3563542b-37c0-4378-9a35-26674b255455%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to