mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Save extra chmod step if sudoing to root
This commit is contained in:
parent
0f052f2fd0
commit
176bf3cbb5
1 changed files with 1 additions and 1 deletions
|
@ -318,7 +318,7 @@ class Runner(object):
|
||||||
tmp_src = tmp + os.path.basename(source)
|
tmp_src = tmp + os.path.basename(source)
|
||||||
conn.put_file(source, tmp_src)
|
conn.put_file(source, tmp_src)
|
||||||
# fix file permissions when the copy is done as a different user
|
# 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)
|
self._low_level_exec_command(conn, "chmod a+r %s" % tmp_src, tmp)
|
||||||
|
|
||||||
# run the copy module
|
# run the copy module
|
||||||
|
|
Loading…
Reference in a new issue