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
51fbc6d2
Commit
51fbc6d2
authored
Oct 31, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Further simplify the debug: var=foo action plugin code.
parent
bbf212a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
lib/ansible/runner/action_plugins/debug.py
+3
-8
No files found.
lib/ansible/runner/action_plugins/debug.py
View file @
51fbc6d2
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
import
ansible
import
ansible
from
ansible
import
utils
from
ansible
import
utils
from
ansible.utils
import
template
from
ansible.runner.return_data
import
ReturnData
from
ansible.runner.return_data
import
ReturnData
class
ActionModule
(
object
):
class
ActionModule
(
object
):
...
@@ -49,14 +50,8 @@ class ActionModule(object):
...
@@ -49,14 +50,8 @@ class ActionModule(object):
else
:
else
:
result
=
dict
(
msg
=
args
[
'msg'
])
result
=
dict
(
msg
=
args
[
'msg'
])
elif
'var'
in
args
:
elif
'var'
in
args
:
results
=
template
.
template
(
None
,
"{{
%
s }}"
%
args
[
'var'
],
inject
)
results
=
utils
.
safe_eval
(
args
[
'var'
],
inject
,
include_exceptions
=
True
)
result
[
args
[
'var'
]]
=
results
intermediate
=
results
[
0
]
exception
=
results
[
1
]
print
exception
if
exception
is
not
None
:
intermediate
=
"failed to evaluate:
%
s"
%
str
(
exception
)
result
[
args
[
'var'
]]
=
intermediate
# force flag to make debug output module always verbose
# force flag to make debug output module always verbose
result
[
'verbose_always'
]
=
True
result
[
'verbose_always'
]
=
True
...
...
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