mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #23724 from rallytime/bp-23609
Backport #23609 to 2015.5
This commit is contained in:
commit
cdf421b9ed
1 changed files with 7 additions and 0 deletions
|
@ -1089,6 +1089,13 @@ def deploy_script(host,
|
|||
|
||||
if remote_dir not in remote_dirs:
|
||||
root_cmd('mkdir -p \'{0}\''.format(remote_dir), tty, sudo, **ssh_kwargs)
|
||||
if ssh_kwargs['username'] != 'root':
|
||||
root_cmd(
|
||||
'chown {0} \'{1}\''.format(
|
||||
ssh_kwargs['username'], remote_dir
|
||||
),
|
||||
tty, sudo, **ssh_kwargs
|
||||
)
|
||||
remote_dirs.append(remote_dir)
|
||||
ssh_file(
|
||||
opts, remote_file, kwargs=ssh_kwargs, local_file=local_file
|
||||
|
|
Loading…
Add table
Reference in a new issue