Skip to content

Instantly share code, notes, and snippets.

@theist
Created May 8, 2015 15:48
Show Gist options
  • Save theist/9ebf13d8aaee8a7ec01e to your computer and use it in GitHub Desktop.
Save theist/9ebf13d8aaee8a7ec01e to your computer and use it in GitHub Desktop.
pry session roles
[3] pry(main)> on roles(["all"]) do | h |
[3] pry(main)* puts h
[3] pry(main)* end
=> []
[4] pry(main)> on roles(["web"]) do | h |
[4] pry(main)* puts h
[4] pry(main)* end
192.168.10.185
=> [#<Thread:0x007f718ce572c0@/home/carlos/.rbenv/versions/2.2.0/gemsets/capistrano/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:11 dead>]
...
[6] pry(main)> on roles("web") do | h |
[6] pry(main)* puts h
[6] pry(main)* end
192.168.10.185
=> [#<Thread:0x007f718c83ae00@/home/carlos/.rbenv/versions/2.2.0/gemsets/capistrano/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:11 dead>]
[7] pry(main)> on roles("all") do | h |
[7] pry(main)* puts h
[7] pry(main)* end
=> []
[8] pry(main)> on roles(:all) do | h |
[8] pry(main)* puts h
[8] pry(main)* end
192.168.10.185
...
[15] pry(#<Capistrano::Configuration::Servers>)> s = Filter.new(:role, :web)
=> #<Capistrano::Configuration::Filter:0x007f5f7d0a8f00 @mode=:role, @rex=/^web$/>
[16] pry(#<Capistrano::Configuration::Servers>)> s = Filter.new(:role, :all)
=> #<Capistrano::Configuration::Filter:0x007f5f7d01a318 @mode=:all, @rex=nil>
[17] pry(#<Capistrano::Configuration::Servers>)> s = Filter.new(:role, "all")
=> #<Capistrano::Configuration::Filter:0x007f5f7cb187c0 @mode=:role, @rex=/^all$/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment