diff options
author | Brian Coca <brian.coca+git@gmail.com> | 2017-04-05 18:40:29 -0400 |
---|---|---|
committer | Brian Coca <brian.coca+git@gmail.com> | 2017-04-20 10:36:18 -0400 |
commit | 0c692484e61d018e769ca6794eee0d0abca21154 (patch) | |
tree | 40bbfc43d3baafcf356795b6fb34d65f8878103e | |
parent | 3e9d4607ce2bb25ad2784cef218c732352f2cb1f (diff) | |
download | ansible-0c692484e61d018e769ca6794eee0d0abca21154.tar.gz |
fix hashing when path is symlink
(cherry picked from commit 631a10745d344c85817ab504f678d2c40ec8ae4b)
-rw-r--r-- | lib/ansible/module_utils/basic.py | 2 |
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) |