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
993bb5c6
Commit
993bb5c6
authored
Aug 11, 2012
by
Dietmar Schinnerl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added stub implementation of filters
parent
bfed87df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
lib/ansible/runner/__init__.py
+2
-2
lib/ansible/utils.py
+9
-1
No files found.
lib/ansible/runner/__init__.py
View file @
993bb5c6
...
...
@@ -655,7 +655,7 @@ class Runner(object):
cmd
=
" || "
.
join
(
md5s
)
cmd
=
"
%
s;
%
s || (echo
\"
${rc}
%
s
\"
)"
%
(
test
,
cmd
,
path
)
return
self
.
_low_level_exec_command
(
conn
,
cmd
,
tmp
,
sudoable
=
False
)
.
split
()[
0
]
return
utils
.
last_non_blank_line
(
self
.
_low_level_exec_command
(
conn
,
cmd
,
tmp
,
sudoable
=
False
)
)
.
split
()[
0
]
# *****************************************************
...
...
@@ -675,7 +675,7 @@ class Runner(object):
cmd
+=
' && echo
%
s'
%
basetmp
result
=
self
.
_low_level_exec_command
(
conn
,
cmd
,
None
,
sudoable
=
False
)
return
result
.
split
(
"
\n
"
)[
0
]
.
strip
()
+
'/'
return
utils
.
last_non_blank_line
(
result
.
split
(
"
\n
"
)
)[
0
]
.
strip
()
+
'/'
# *****************************************************
...
...
lib/ansible/utils.py
View file @
993bb5c6
...
...
@@ -117,9 +117,11 @@ def json_loads(data):
return
json
.
loads
(
data
)
def
parse_json
(
data
):
def
parse_json
(
raw_
data
):
''' this version for module return data only '''
data
=
filter_leading_garbage
(
raw_data
)
try
:
return
json
.
loads
(
data
)
except
:
...
...
@@ -409,3 +411,9 @@ def do_encrypt(result, encrypt, salt_size=None, salt=None):
return
result
def
last_non_blank_line
(
lines
):
return
lines
def
filter_leading_garbage
(
lines
):
return
lines
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