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
19b43cd4
Commit
19b43cd4
authored
Jul 08, 2012
by
Dave Hatton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
further md5 fixes
parent
921bf3da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
lib/ansible/runner/__init__.py
+2
-1
lib/ansible/utils.py
+8
-1
No files found.
lib/ansible/runner/__init__.py
View file @
19b43cd4
...
...
@@ -746,7 +746,8 @@ class Runner(object):
test
=
"[[ -r
%
s ]]"
%
path
md5s
=
[
"(
%
s && /usr/bin/md5sum
%
s 2>/dev/null)"
%
(
test
,
path
),
"(
%
s && /sbin/md5sum -q
%
s 2>/dev/null)"
%
(
test
,
path
)
"(
%
s && /sbin/md5sum -q
%
s 2>/dev/null)"
%
(
test
,
path
),
"(
%
s && /usr/bin/digest -a md5 -v
%
s 2>/dev/null)"
%
(
test
,
path
)
]
cmd
=
" || "
.
join
(
md5s
)
cmd
=
"
%
s || (echo
\"
0
%
s
\"
)"
%
(
cmd
,
path
)
...
...
lib/ansible/utils.py
View file @
19b43cd4
...
...
@@ -314,7 +314,14 @@ def parse_kv(args):
def
local_md5
(
file
):
''' compute local md5sum, return None if file is not present '''
cmd
=
"/usr/bin/md5sum
%
s 2> /dev/null || /sbin/md5 -q
%
s"
%
(
file
,
file
)
#was >>> cmd = "/usr/bin/md5sum %s 2> /dev/null || /sbin/md5 -q %s" % (file,file)
md5s
=
[
"(/usr/bin/md5sum
%
s 2>/dev/null)"
%
(
file
),
"(/sbin/md5sum -q
%
s 2>/dev/null)"
%
(
file
),
"(/usr/bin/digest -a md5 -v
%
s 2>/dev/null)"
%
(
file
)
]
cmd
=
" || "
.
join
(
md5s
)
if
not
os
.
path
.
exists
(
file
):
return
None
else
:
...
...
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