mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-03 01:03:09 +00:00
Save extra chmod step if sudoing to root
This commit is contained in:
@@ -318,7 +318,7 @@ class Runner(object):
|
||||
tmp_src = tmp + os.path.basename(source)
|
||||
conn.put_file(source, tmp_src)
|
||||
# fix file permissions when the copy is done as a different user
|
||||
if self.sudo and self.sudo_user:
|
||||
if self.sudo and self.sudo_user != 'root':
|
||||
self._low_level_exec_command(conn, "chmod a+r %s" % tmp_src, tmp)
|
||||
|
||||
# run the copy module
|
||||
|
||||
Reference in New Issue
Block a user