Thanks Lee. Will use Ruby methods. On Friday, May 16, 2014 5:30:40 PM UTC+10, Lee Hambley wrote: > > http://stackoverflow.com/a/1290119 > > Lee Hambley > -- > http://lee.hambley.name/ > +49 (0) 170 298 5667 > > > On 16 May 2014 06:48, Haani Niyaz <haani...@gmail.com <javascript:>>wrote: > >> Hi there, >> >> I was wondering if tasks can be written to be used within a different >> task's *on *block. >> >> So as an example: >> >> desc "Testing status" >> task :status do >> execute "sudo service nginx status" >> end >> >> >> desc "Testing get info " >> task :start do >> on roles(:web), in: :sequence do |server| >> capture "hostname" >> # how do I call testing:status here >> end >> end >> >> >> So as per the code example above, I'd like to call the* testing:statu*s >> task on the same server loop defined in the *testing:start* task. >> >> As far I know I cannot do an *invoke *within an on block in capistrano 3. >> >> Versions: >> >> - Ruby - 2.1.1 >> - Capistrano 3.1.0 >> >> >> >> -- >> 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 capistrano+...@googlegroups.com <javascript:>. >> To view this discussion on the web, visit >> https://groups.google.com/d/msgid/capistrano/eb01bc5a-16f7-44e0-be3f-89cf4f1af80c%40googlegroups.com<https://groups.google.com/d/msgid/capistrano/eb01bc5a-16f7-44e0-be3f-89cf4f1af80c%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > >
-- 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 capistrano+unsubscr...@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/859ed64e-324b-42c4-80e0-f1bbf74a2756%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.