Handle mode-setting of symlink to RO filesystem (#58564)
Fix for https://github.com/ansible/ansible/issues/58562
This commit is contained in:
parent
6e9bcc2579
commit
a9fcd1d197
1 changed files with 1 additions and 1 deletions
|
@ -1114,7 +1114,7 @@ class AnsibleModule(object):
|
|||
if underlying_stat.st_mode != new_underlying_stat.st_mode:
|
||||
os.chmod(b_path, stat.S_IMODE(underlying_stat.st_mode))
|
||||
except OSError as e:
|
||||
if os.path.islink(b_path) and e.errno == errno.EPERM: # Can't set mode on symbolic links
|
||||
if os.path.islink(b_path) and e.errno in (errno.EPERM, errno.EROFS): # Can't set mode on symbolic links
|
||||
pass
|
||||
elif e.errno in (errno.ENOENT, errno.ELOOP): # Can't set mode on broken symbolic links
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue