1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix related to #13981

When working around "bad systems that insist on not allowing
updates in an atomic manner", we should not run previous exception
management code that tries to perform atomic move in case of
exception since the dirty non atomic move has already been
performed.
This commit is contained in:
Pascal Grange 2016-02-15 10:18:44 +01:00
parent 4b953c4b16
commit 5d49f4e629

View file

@ -1758,7 +1758,7 @@ class AnsibleModule(object):
# only try workarounds for errno 18 (cross device), 1 (not permitted), 13 (permission denied) # only try workarounds for errno 18 (cross device), 1 (not permitted), 13 (permission denied)
# and 26 (text file busy) which happens on vagrant synced folders and other 'exotic' non posix file systems # and 26 (text file busy) which happens on vagrant synced folders and other 'exotic' non posix file systems
self.fail_json(msg='Could not replace file: %s to %s: %s' % (src, dest, e)) self.fail_json(msg='Could not replace file: %s to %s: %s' % (src, dest, e))
else:
dest_dir = os.path.dirname(dest) dest_dir = os.path.dirname(dest)
dest_file = os.path.basename(dest) dest_file = os.path.basename(dest)
try: try: