summaryrefslogtreecommitdiff
path: root/lib/ansible/utils
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/utils')
-rw-r--r--lib/ansible/utils/listify.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/ansible/utils/listify.py b/lib/ansible/utils/listify.py
index c8fc97bed7..dfc8012042 100644
--- a/lib/ansible/utils/listify.py
+++ b/lib/ansible/utils/listify.py
@@ -19,24 +19,23 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
-from six import iteritems, string_types
-
-import re
from ansible.template import Templar
from ansible.template.safe_eval import safe_eval
__all__ = ['listify_lookup_plugin_terms']
-LOOKUP_REGEX = re.compile(r'lookup\s*\(')
-
+#FIXME: probably just move this into lookup plugin base class
def listify_lookup_plugin_terms(terms, variables, loader):
if isinstance(terms, basestring):
stripped = terms.strip()
templar = Templar(loader=loader, variables=variables)
- terms = templar.template(terms, convert_bare=True)
+ #FIXME: warn/deprecation on bare vars in with_ so we can eventually remove fail on undefined override
+ terms = templar.template(terms, convert_bare=True, fail_on_undefined=False)
+
+ #TODO: check if this is needed as template should also return correct type already
terms = safe_eval(terms)
if isinstance(terms, basestring):