mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-01 04:30:22 -07:00
Avoid templating raw lookup strings
This commit is contained in:
parent
5ce142a3b6
commit
a45c3b84f3
2 changed files with 5 additions and 2 deletions
|
@ -1257,7 +1257,10 @@ def listify_lookup_plugin_terms(terms, basedir, inject):
|
|||
# with_items: {{ alist }}
|
||||
|
||||
stripped = terms.strip()
|
||||
if not (stripped.startswith('{') or stripped.startswith('[')) and not stripped.startswith("/") and not stripped.startswith('set(['):
|
||||
if not (stripped.startswith('{') or stripped.startswith('[')) and \
|
||||
not stripped.startswith("/") and \
|
||||
not stripped.startswith('set([') and \
|
||||
not LOOKUP_REGEX.search(terms):
|
||||
# if not already a list, get ready to evaluate with Jinja2
|
||||
# not sure why the "/" is in above code :)
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue