Equivalent of `run command, once: true` in Capistrano 3

317 views
Skip to first unread message

Joshua Wood

unread,
Dec 17, 2013, 6:44:31 PM12/17/13
to capis...@googlegroups.com
Capistrano 2 used to have an option to run a command once on a remote server rather than on all roles (I believe this was the `run 'command', once: true` option?). Does Capistrano 3/SSHKit have a similar option?

Lee Hambley

unread,
Dec 18, 2013, 2:27:23 AM12/18/13
to capistrano
Just do:

on roles(:role_with_one_server) do 
# or
on 'example.com' do 
  execute(anything)
end

That'll do it. No need for a special DSL.
Reply all
Reply to author
Forward
0 new messages