From 631a10745d344c85817ab504f678d2c40ec8ae4b Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 5 Apr 2017 18:40:29 -0400 Subject: [PATCH] fix hashing when path is symlink --- lib/ansible/module_utils/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index fb1f6f5130..70ee924a3a 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -2051,7 +2051,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)