summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Coca <brian.coca+git@gmail.com>2017-04-05 18:40:29 -0400
committerBrian Coca <brian.coca+git@gmail.com>2017-04-20 10:36:18 -0400
commit0c692484e61d018e769ca6794eee0d0abca21154 (patch)
tree40bbfc43d3baafcf356795b6fb34d65f8878103e
parent3e9d4607ce2bb25ad2784cef218c732352f2cb1f (diff)
downloadansible-0c692484e61d018e769ca6794eee0d0abca21154.tar.gz
fix hashing when path is symlink
(cherry picked from commit 631a10745d344c85817ab504f678d2c40ec8ae4b)
-rw-r--r--lib/ansible/module_utils/basic.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py
index eca1ccae23..7b8d2e1f48 100644
--- a/lib/ansible/module_utils/basic.py
+++ b/lib/ansible/module_utils/basic.py
@@ -1809,7 +1809,7 @@ class AnsibleModule(object):
(filename, algorithm, ', '.join(AVAILABLE_HASH_ALGORITHMS)))
blocksize = 64 * 1024
- infile = open(filename, 'rb')
+ infile = open(os.path.realpath(filename), 'rb')
block = infile.read(blocksize)
while block:
digest_method.update(block)