Merge pull request #3706 from lorin/sudo_user_breakage
Fix sudo_user copy error
This commit is contained in:
commit
44d060628e
1 changed files with 2 additions and 2 deletions
|
@ -869,8 +869,8 @@ class AnsibleModule(object):
|
|||
# Optimistically try a rename, solves some corner cases and can avoid useless work.
|
||||
os.rename(src, dest)
|
||||
except (IOError,OSError), e:
|
||||
# only try workarounds for errno 18 (cross device) and 1 (not permited)
|
||||
if e.errno != errno.EPERM and e.errno != errno.EXDEV:
|
||||
# only try workarounds for errno 18 (cross device), 1 (not permited) and 13 (permission denied)
|
||||
if e.errno != errno.EPERM and e.errno != errno.EXDEV and e.errno != errno.EACCES:
|
||||
self.fail_json(msg='Could not replace file: %s to %s: %s' % (src, dest, e))
|
||||
|
||||
dest_dir = os.path.dirname(dest)
|
||||
|
|
Loading…
Reference in a new issue