hak*_*8or 9 shell sudo capistrano
I would like to be able to run apt-get update and then install a few new programs (tmux) along with apt-get upgrade on all my servers when running cap setup but am fumbling around with the apparent lack of documentation regarding sudo on v3.
The gotcha on the v3 release page for sudo makes me sad. http://www.capistranorb.com/2013/06/01/release-announcement.html
For example, here is how I think sudo should work based on some googling, but I keep getting asked for a password.
desc "Check that we can access everything"
task :setup do
on roles(:web) do
uptime = capture(:uptime)
info "Uptime: #{uptime}"
sudo "apt-get update"
end
end
Run Code Online (Sandbox Code Playgroud)
随着下面的响应我手动输入终端中的密码似乎根本没有做任何事情(没有错误,没有响应).
DEBUG [e47a40c6] Finished in 4.646 seconds command successful.
DEBUG [e47a40c6] 05:37:52 up 14:36, 3 users, load average: 0.00, 0.01, 0.05
DEBUG [e47a40c6] Finished in 4.646 seconds command successful.
INFO Uptime: 05:37:52 up 14:36, 3 users, load average: 0.00, 0.01, 0.05
INFO [d194a520] Running /usr/bin/env sudo apt-get update on 192.168.1.126
DEBUG [d194a520] Command: /usr/bin/env sudo apt-get update
DEBUG [d194a520] [sudo] password for deploy:
Run Code Online (Sandbox Code Playgroud)
此外,是否有一个我没有看到哪个地方保存了已更新到v3的文档?
| 归档时间: |
|
| 查看次数: |
12506 次 |
| 最近记录: |