mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
better chown errors
This commit is contained in:
parent
7417282d37
commit
a6e27a903a
1 changed files with 2 additions and 2 deletions
|
@ -1132,9 +1132,9 @@ class AnsibleModule(object):
|
|||
return True
|
||||
try:
|
||||
os.lchown(b_path, uid, -1)
|
||||
except OSError:
|
||||
except (IOError, OSError) as e:
|
||||
path = to_text(b_path)
|
||||
self.fail_json(path=path, msg='chown failed')
|
||||
self.fail_json(path=path, msg='chown failed: %s' % (to_text(e)))
|
||||
changed = True
|
||||
return changed
|
||||
|
||||
|
|
Loading…
Reference in a new issue