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
650e967b
Commit
650e967b
authored
Jul 28, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid templating raw lookup strings
parent
953a2dfb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
lib/ansible/runner/action_plugins/debug.py
+1
-1
lib/ansible/utils/__init__.py
+4
-1
No files found.
lib/ansible/runner/action_plugins/debug.py
View file @
650e967b
...
@@ -50,7 +50,7 @@ class ActionModule(object):
...
@@ -50,7 +50,7 @@ class ActionModule(object):
result
=
dict
(
failed
=
True
,
msg
=
args
[
'msg'
])
result
=
dict
(
failed
=
True
,
msg
=
args
[
'msg'
])
else
:
else
:
result
=
dict
(
msg
=
args
[
'msg'
])
result
=
dict
(
msg
=
args
[
'msg'
])
elif
'var'
in
args
:
elif
'var'
in
args
and
not
utils
.
LOOKUP_REGEX
.
search
(
args
[
'var'
])
:
results
=
template
.
template
(
self
.
basedir
,
"{{
%
s }}"
%
args
[
'var'
],
inject
)
results
=
template
.
template
(
self
.
basedir
,
"{{
%
s }}"
%
args
[
'var'
],
inject
)
result
[
args
[
'var'
]]
=
results
result
[
args
[
'var'
]]
=
results
...
...
lib/ansible/utils/__init__.py
View file @
650e967b
...
@@ -1257,7 +1257,10 @@ def listify_lookup_plugin_terms(terms, basedir, inject):
...
@@ -1257,7 +1257,10 @@ def listify_lookup_plugin_terms(terms, basedir, inject):
# with_items: {{ alist }}
# with_items: {{ alist }}
stripped
=
terms
.
strip
()
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
# if not already a list, get ready to evaluate with Jinja2
# not sure why the "/" is in above code :)
# not sure why the "/" is in above code :)
try
:
try
:
...
...
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