diff options
author | Romeo Theriault <romeot@hawaii.edu> | 2012-11-12 10:37:00 -1000 |
---|---|---|
committer | Romeo Theriault <romeot@hawaii.edu> | 2012-11-12 10:37:00 -1000 |
commit | 4cd133ed8f347e48e80c9d44435cdc9444402089 (patch) | |
tree | 69e41f36d078bc82857c6d0722f01a461d8c8ab3 /lib/ansible/runner | |
parent | 8f9bef9d517371a54f1179789cd947bca06e38be (diff) | |
download | ansible-4cd133ed8f347e48e80c9d44435cdc9444402089.tar.gz |
add bsd md5 support to fetch module
Diffstat (limited to 'lib/ansible/runner')
-rw-r--r-- | lib/ansible/runner/__init__.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 2a400966ad..b41d28248d 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -461,9 +461,12 @@ class Runner(object): test = "rc=0; [ -r \"%s\" ] || rc=2; [ -f \"%s\" ] || rc=1" % (path,path) md5s = [ - "(/usr/bin/md5sum %s 2>/dev/null)" % path, - "(/sbin/md5sum -q %s 2>/dev/null)" % path, - "(/usr/bin/digest -a md5 %s 2>/dev/null)" % path + "(/usr/bin/md5sum %s 2>/dev/null)" % path, # Linux + "(/sbin/md5sum -q %s 2>/dev/null)" % path, # ? + "(/usr/bin/digest -a md5 %s 2>/dev/null)" % path, # Solaris 10+ + "(/sbin/md5 -q %s 2>/dev/null)" % path, # Freebsd + "(/usr/bin/md5 -n %s 2>/dev/null)" % path, # Netbsd + "(/bin/md5 -q %s 2>/dev/null)" % path # Openbsd ] cmd = " || ".join(md5s) |