mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-11 16:44:22 -07:00
parent
8a3f8b757b
commit
344d8d51ab
1 changed files with 1 additions and 8 deletions
|
@ -311,14 +311,7 @@ class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):
|
||||||
|
|
||||||
if final_path:
|
if final_path:
|
||||||
log("moving %s to %s" % (out_path, final_path))
|
log("moving %s to %s" % (out_path, final_path))
|
||||||
args = ['sudo','cp',out_path,final_path]
|
self.server.module.atomic_move(out_path, final_path)
|
||||||
rc, stdout, stderr = self.server.module.run_command(args, close_fds=True)
|
|
||||||
if rc != 0:
|
|
||||||
return dict(failed=True, stdout="failed to copy the file into position with sudo")
|
|
||||||
args = ['sudo','chown',final_user,out_path,final_path]
|
|
||||||
rc, stdout, stderr = self.server.module.run_command(args, close_fds=True)
|
|
||||||
if rc != 0:
|
|
||||||
return dict(failed=True, stdout="failed to chown the file via sudo")
|
|
||||||
return dict()
|
return dict()
|
||||||
|
|
||||||
def daemonize(module, password, port, minutes):
|
def daemonize(module, password, port, minutes):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue