diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 8006415df4e..f05ced360c4 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -2533,6 +2533,7 @@ class AnsibleModule(object): # sadly there are some situations where we cannot ensure atomicity, but only if # the user insists and we get the appropriate error we update the file unsafely try: + out_dest = in_src = None try: out_dest = open(dest, 'wb') in_src = open(src, 'rb')