Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
d6b78e9d
Commit
d6b78e9d
authored
Jan 06, 2014
by
James Tanner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #5238 Improve error messaging about unquoted variable references in playbooks
parent
57d54c1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
lib/ansible/utils/__init__.py
+22
-0
No files found.
lib/ansible/utils/__init__.py
View file @
d6b78e9d
...
...
@@ -447,8 +447,30 @@ Note: The error may actually appear before this position: line %s, column %s
%
s
%
s"""
%
(
path
,
mark
.
line
+
1
,
mark
.
column
+
1
,
before_probline
,
probline
,
arrow
)
unquoted_var
=
None
if
'{{'
in
probline
and
'}}'
in
probline
:
if
'"{{'
not
in
probline
or
"'{{"
not
in
probline
:
unquoted_var
=
True
msg
=
process_common_errors
(
msg
,
probline
,
mark
.
column
)
if
not
unquoted_var
:
msg
=
process_common_errors
(
msg
,
probline
,
mark
.
column
)
else
:
msg
=
msg
+
"""
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:
with_items:
- {{ foo }}
Should be written as:
with_items:
- "{{ foo }}"
"""
msg
=
process_common_errors
(
msg
,
probline
,
mark
.
column
)
else
:
# No problem markers means we have to throw a generic
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment