diff --git a/lib/ansible/utils/__init__.py b/lib/ansible/utils/__init__.py index 476622e6766..2543c5776ac 100644 --- a/lib/ansible/utils/__init__.py +++ b/lib/ansible/utils/__init__.py @@ -1023,7 +1023,7 @@ def listify_lookup_plugin_terms(terms, basedir, inject): # not sure why the "/" is in above code :) try: new_terms = template.template(basedir, "{{ %s }}" % terms, inject) - if isinstance(new_terms, basestring) and "{{" in new_terms.find: + if isinstance(new_terms, basestring) and new_terms.find("{{") != -1: pass else: terms = new_terms