Aha, thank you!

On 1/28/2013 10:54 PM, Donovan Bray wrote:
It should be:

task :deploy, :roles .....

Note the 's'

:roles => :app
:roles => [:app]
:roles => [:app, :web]

Are all valid on a task object


On Jan 28, 2013, at 1:05 PM, Jonathan Rochkind <[email protected]> wrote:

Okay, I'm not sure if I've confused about the basic way cap roles work, or 
something else is going on, or what.

I have two servers, defined like:

    server "main.example.org", :app, :web, :db, :primary => true

    role :my_custom_role, "special.example.org"


Then I have a custom task, defined like:

     namespace :my_custom_thing do
        task :deploy, :role => :app do
            # do some things, including
            top.upload(some_file, some_destination_path)
        end
     end

I had thought that if I ran "cap my_custom_thing:deploy", it would only execute 
that task on servers with role app, meaning only try to run that manual 'upload' to 
main.example.org (which has role :app), and not upload it to special.example.org (which 
does not have role :app).

Yet, when I role it... it tries to upload the file to BOTH main.example.org, 
and special.example.org.

Am I fundamentally misunderstanding how this stuff works? Or from what I've 
described, ought it to be only doing the upload to the single server called 
main.example.org with role :app ?

--
--
* 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
--- You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.




--
--
* 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
--- You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to