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 <[email protected]> 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 <[email protected]> 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 [email protected]
> * To unsubscribe from this group, send email to
> [email protected]<capistrano%[email protected]>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 [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to