end
username = 'root'
# the echo sets the terminal title. it would be better to do this on the server
- exec "echo -n \"\\033]0;#{username}@#{node.domain.full}\007\" && ssh -l #{username} -p #{node.ssh.port} #{options.join(' ')} #{node.name}"
+ cmd = "ssh -l #{username} -p #{node.ssh.port} #{options.join(' ')} #{node.name}"
+ log 2, cmd
+ title = "echo -n \"\\033]0;#{username}@#{node.domain.full}\007\""
+ exec "#{title} && #{cmd}"
end
end