1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Bug: chmod should be called only if the tmp dir was created in the first place

This commit is contained in:
jeromew 2014-01-22 14:04:39 +00:00
parent 61d283e2ad
commit ef69d23715

View file

@ -328,7 +328,7 @@ class Runner(object):
environment_string = self._compute_environment_string(inject) environment_string = self._compute_environment_string(inject)
if (self.sudo or self.su) and (self.sudo_user != 'root' or self.su_user != 'root'): if tmp.find("tmp") != -1 and (self.sudo or self.su) and (self.sudo_user != 'root' or self.su_user != 'root'):
# deal with possible umask issues once sudo'ed to other user # deal with possible umask issues once sudo'ed to other user
cmd_chmod = "chmod a+r %s" % remote_module_path cmd_chmod = "chmod a+r %s" % remote_module_path
self._low_level_exec_command(conn, cmd_chmod, tmp, sudoable=False) self._low_level_exec_command(conn, cmd_chmod, tmp, sudoable=False)