Fix bug.
This commit is contained in:
parent
b598076391
commit
edf4738b06
|
@ -67,8 +67,8 @@ namespace :create_site do
|
||||||
exec_ssh_command_for_create(ssh,"sudo -p 'sudo password:' apt-get install -y sshpass")
|
exec_ssh_command_for_create(ssh,"sudo -p 'sudo password:' apt-get install -y sshpass")
|
||||||
outputs = exec_ssh_command_for_create(ssh,"sshpass -p \"#{server.password}\" rsync -arv --delete --exclude={tmp/cache/,tmp/unicorn.sock,tmp/pids/*} #{server.account}@#{server.ip}:#{template_site.path}/#{template_site.get_site_name}/ #{args.path}/#{@site_construct.get_site_name}/",true)
|
outputs = exec_ssh_command_for_create(ssh,"sshpass -p \"#{server.password}\" rsync -arv --delete --exclude={tmp/cache/,tmp/unicorn.sock,tmp/pids/*} #{server.account}@#{server.ip}:#{template_site.path}/#{template_site.get_site_name}/ #{args.path}/#{@site_construct.get_site_name}/",true)
|
||||||
if outputs.join("\n").include?("Host key verification failed")
|
if outputs.join("\n").include?("Host key verification failed")
|
||||||
exec_ssh_command_by_sudo_for_create(session,"ssh-keygen -f \"$HOME/.ssh/known_hosts\" -R #{server.ip}")
|
exec_ssh_command_by_sudo_for_create(ssh,"ssh-keygen -f \"$HOME/.ssh/known_hosts\" -R #{server.ip}")
|
||||||
exec_ssh_command_by_sudo_for_create(session,"ssh-keyscan -H #{server.ip} >> ~/.ssh/known_hosts")
|
exec_ssh_command_by_sudo_for_create(ssh,"ssh-keyscan -H #{server.ip} >> ~/.ssh/known_hosts")
|
||||||
exec_ssh_command_for_create(ssh,"sshpass -p \"#{server.password}\" rsync -arv --delete --exclude={tmp/cache/,tmp/unicorn.sock,tmp/pids/*} #{server.account}@#{server.ip}:#{template_site.path}/#{template_site.get_site_name}/ #{args.path}/#{@site_construct.get_site_name}/",true)
|
exec_ssh_command_for_create(ssh,"sshpass -p \"#{server.password}\" rsync -arv --delete --exclude={tmp/cache/,tmp/unicorn.sock,tmp/pids/*} #{server.account}@#{server.ip}:#{template_site.path}/#{template_site.get_site_name}/ #{args.path}/#{@site_construct.get_site_name}/",true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue