mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 11:10:21 -07:00
capture possible chown stderr output
This commit is contained in:
parent
5a8e61a610
commit
9ff59090c2
1 changed files with 1 additions and 1 deletions
|
@ -216,7 +216,7 @@ def set_owner_if_different(path, owner, changed):
|
||||||
return changed
|
return changed
|
||||||
user, group = user_and_group(path)
|
user, group = user_and_group(path)
|
||||||
if owner != user:
|
if owner != user:
|
||||||
rc = os.system("/bin/chown -R %s %s" % (owner, path))
|
rc = os.system("/bin/chown -R %s %s 2>/dev/null" % (owner, path))
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
fail_kv(path=path, msg='chown failed')
|
fail_kv(path=path, msg='chown failed')
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue