I am trying to use EC2 tools to get all the machines with a particular tag in some type of array in /config/deploy/prod.rb file in Capistrano. Something like this:

In prod.rb file:

//untested command
workers-array[]=$(ec2-describe-instances -F vpc-id=1234 -F tag:Env=prod -F     tag:SystemType=worker)
 for(i=0;i<workers-array.len;i++){
     role :worker-A, workers-array[i]
   }

I am not sure how we can do this in capistrano, am new to ruby too. Guys any help on this would be really appreciated.

link|improve this question

67% accept rate
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.