roles :db, "one.server.com", "two.server.com"

  task :hello_world, :roles => :db do
    run "echo Hello, $HOSTNAME"
  end

task :runthis do

   #Run on default roles
   hello_world

   # This time only host specific
   hello_world, hosts => "two.server.com"

end

----------------------

>From the command line you would do something like this
(But this fails.. )
cap runthis

(work around.. )
cap hello_world
cap hello_world HOSTS="two.server.com"

The point is to pass variable to a task from another task.. how do you
do this????
(ie.
  using |channel, stream, data| to catch a data.match /something/ and
  execute another job based on channel[:host] return value as the
target limited host
 )

Am I just being silly? or missing something?
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to