diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 3327d1b2e2c..de9d194d795 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -2024,7 +2024,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)