summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cammarata <jimi@sngx.net>2016-03-28 15:43:43 -0400
committerJames Cammarata <jimi@sngx.net>2016-03-28 16:52:15 -0400
commit4b1aad64b8a15835e4245e76f49e38147b526570 (patch)
treee898cff5f5d270f6b6491e748801316adb201ab5
parent9ad418ae6d1ae145d97900563927f694aac04748 (diff)
downloadansible-4b1aad64b8a15835e4245e76f49e38147b526570.tar.gz
Take previous jinja2 blocks into account in splitter when we see quotes
Previously, split_args() was not taking print/block/comment depth into account when splitting things, meaning that if there was a quote character inside an un-quoted variable (ie. {{ foo | some_filter(' ') }}), it was incorrectly splitting on the quotes instead of continuing to append to the previous param. Fixes #13630
-rw-r--r--lib/ansible/parsing/splitter.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/parsing/splitter.py b/lib/ansible/parsing/splitter.py
index 8f3c5cc088..5e0c2b3c7e 100644
--- a/lib/ansible/parsing/splitter.py
+++ b/lib/ansible/parsing/splitter.py
@@ -204,7 +204,7 @@ def split_args(args):
# to the end of the list, since we'll tack on more to it later
# otherwise, if we're inside any jinja2 block, inside quotes, or we were
# inside quotes (but aren't now) concat this token to the last param
- if inside_quotes and not was_inside_quotes:
+ if inside_quotes and not was_inside_quotes and not(print_depth or block_depth or comment_depth):
params.append(token)
appended = True
elif print_depth or block_depth or comment_depth or inside_quotes or was_inside_quotes: