I read badly your firsts emails, so sorry. Could you test this task?
role :test_role, "ap-1", "ap-2" desc "Execute task in all servers of a role" task :role_with_several_servers, :roles => :test_role do run "uptime" end I executed it locally and worked fine. I'm trying to know why happen it. On Wed, Sep 29, 2010 at 7:54 PM, jeyroz <jey.osb...@gmail.com> wrote: > The gentleman in the following StackOverflow post seems to have > experienced the same issue, however no helpful (permanent) resolution > exists... > > http://stackoverflow.com/questions/2718314/capistrano-fails-for-multiple-host-deployments > > Specifying the following does indeed allow all deployments to run > successfully, but the passphrase does need to be repeated for each > node. > default_run_options[:max_hosts] = 1 > > Using "ssh-agent" to cache my key passphrase alleviates the annoyance, > but only really covers up the core issue (about which I'm still > clueless). > > Best, > > ~ j > > > On Sep 29, 9:52 am, jeyroz <jey.osb...@gmail.com> wrote: > > Thanks for the suggestion Rafael. I attempted that as well (various > > formats actually) but to no avail. > > > > role :app, %w{ap-1, ap-2} > > role :app, ["ap-1", "ap-2"] > > > > Passing the nodes in as an array actually kicks back the following > > error... > > /path/to/gems/1.9.1/gems/capistrano-2.5.19/lib/capistrano/ > > server_definition.rb:16:in `initialize': undefined method `match' for > > ["ap-1", "ap-2"]:Array (NoMethodError) > > > > Which led me to disregard the suggestion as I had seen several > > different documented examples of ways to pass the nodes into "role". > > The syntax I chose came from the docs below (also linked to from your > > provided URI)... > > > > -- Fromhttp:// > rdoc.info/github/capistrano/capistrano/master/Capistrano/Confi... > > -- > > Usage: > > snip[...] > > role :app, "app1.example.com", "app2.example.com" > > -- End -- > > > > That format seems to work (almost), aside from the pesky passphrase > > requests and subsequent failure. > > Am I missing something obvious? > > > > Best, > > > > ~ jeremy > > > > On Sep 29, 7:39 am, Rafael García <r...@aspgems.com> wrote: > > > > > > > > > Try to write it as array[1]. > > > > > role :app, ["ap-1", "ap-2"] > > > > > Regards > > > > > [1]http://wiki.github.com/capistrano/capistrano/roles > > > > > On Wed, Sep 29, 2010 at 4:09 PM, jeyroz <jey.osb...@gmail.com> wrote: > > > > To further clarify my deploy.rb example, the three "role" assignments > > > > at the end have been applied exclusively. The final entry in the list > > > > is the one that doesn't work. > > > > > > # role :app, "ap-1" # <= works > > > > # role :app, "ap-2" # <= works > > > > role :app, "ap-1", "ap-2" # <= doesn't work > > > > > > Thanks for the help and input. > > > > > > ~ jeremy > > > > > > On Sep 28, 6:21 pm, jeyroz <jey.osb...@gmail.com> wrote: > > > > > Hello, I recently began experimenting with Capistrano. Deploying > our > > > > > codebase to a single server (role :app, "ap-1") worked well, but > once > > > > > I included a secondary application server to the list (role :app, > > > > > "ap-1", "ap-2"), things went sideways... > > > > > > > * executing `deploy:setup' > > > > > * executing "snip[...]" > > > > > servers: ["ap-1", "ap-2"] > > > > > Enter passphrase for /home/devuser/.ssh/id_dsa: Enter passphrase > for / > > > > > home/devuser/.ssh/id_dsa: > > > > > > > You'll note the duplicate requests for a ssh-key "passphrase" in > > > > > succession. When provided, I'm prompted for it again, and again. If > I > > > > > simply [enter] through the process numerous times, I receive the > > > > > following... > > > > > > > connection failed for: ap-1 (OpenSSL::PKey::DSAError: Neither PUB > key > > > > > nor PRIV key:: nested asn1 error), ap-2 (NoMethodError: undefined > > > > > method `overwrite' for nil:NilClass) > > > > > > > Passphrase protected DSA keys are used to quickly log-in between > all > > > > > of our servers. The "devuser" above has a public key registered as > an > > > > > "authorized_key" with the "deployuser" used to deploy the > application > > > > > on each server. The keys are set up appropriately and have been > > > > > verified. Again, I can successfully deploy to either server > > > > > individually using the users/keys in question, without issue, but > not > > > > > both at once. > > > > > > > My deploy.rb file is embarrassingly simple at this point... > > > > > > > set :application, "appname" > > > > > set :repository, "http://domain.com/svn/appname/" > > > > > set :user, "deployuser" > > > > > set :use_sudo, false > > > > > set :scm, :subversion > > > > > set :scm_username, "svnuser" > > > > > set :scm_password, "svnpass" > > > > > set :deploy_to, "/path/to/#{application}" > > > > > role :app, "ap-1" # <= works > > > > > role :app, "ap-2" # <= works > > > > > role :app, "ap-1", "ap-2" # <= doesn't work > > > > > > > Any ideas where I have gone wrong at such an early stage? > > > > > > > Thanks for the help. > > > > > > > Best, > > > > > > > ~ jeremy > > > > > > -- > > > > * You received this message because you are subscribed to the Google > Groups > > > > "Capistrano" group. > > > > * To post to this group, send email to capistrano@googlegroups.com > > > > * To unsubscribe from this group, send email to > > > > capistrano+unsubscr...@googlegroups.com<capistrano%2bunsubscr...@googlegroups.com> > <capistrano%2bunsubscr...@googlegrou ps.com>For more options, visit this > group at > > > >http://groups.google.com/group/capistrano?hl=en > > -- > * You received this message because you are subscribed to the Google Groups > "Capistrano" group. > * To post to this group, send email to capistrano@googlegroups.com > * To unsubscribe from this group, send email to > capistrano+unsubscr...@googlegroups.com<capistrano%2bunsubscr...@googlegroups.com>For > more options, visit this group at > http://groups.google.com/group/capistrano?hl=en > -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to capistrano@googlegroups.com * To unsubscribe from this group, send email to capistrano+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en