You can write something like: task :load_hosts do # load your file here, itterate over it calling role() when you are done with the list end
Then $ cap load_hosts uname That's far from ideal, but it should get you started - you can of course put any arbitrary ruby code that you like into the capfile. Also, these should be threaded against your servers, there are some hard limits on the number of concurrent threads, I think - but you shouldn't struggle with 50 hosts. Also, Capistrano is for deployment, for user management you should consider http://github.com/paukul/zool -- Lee Hambley Twitter: @leehambley | @capistranorb Blog: http://lee.hambley.name/ Working with Rails: http://is.gd/1s5W1 On 22 February 2010 21:43, asif <[email protected]> wrote: > Hi all > > I am running the following version of ruby and capistrano on my ubuntu > 9.04 > > ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux] > Capistrano v2.5.9 > > I am trying to exapand the following capfile > > set :gateway, "gw.example.net" > role :myhosts, "host1.example.net", "host2.example.net", > "host3.example.net" > task :uname, :roles => :myhosts do > run "uname -a" > end > > I like to add 50 hosts. Do I need to add them comma separated like > above? > > Is it possible to point to a file with list of hosts (one host per > line) instead? > > Also, can I have multiple threads run in parallel instead of ssh'ng to > one host at a time? > > P.S. capistrano newbie alert! > > -- > * 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
