forward/capify-ec2 — pull request #28 by jasonneylon (2013-05-09 16:34:27+00:00)
Title: Fixed bug with rolling deploys where server-specific options were not al...

Hi,

I noticed that the

:only => {:scheduler => true}

in our deploy.rb was not being respected when running the **rolling_deploy** task. This was causing our cron jobs to run on all machines in the role.

Turns out that the options applied during a rolling deploy are just the options of the first machine in the role.

So for the 3 machines in this role:

i-c41ce889 c1.medium eu-west-1a ...
Tags: {"Options": "scheduler"}
i-440df909 c1.medium eu-west-1c ...
i-460df90b c1.medium eu-west-1b ...

The options for the first machine i-c41ce889 would be applied when deploying to all 3 machines.

The attached commit fixes the problem.

Cheers,
Jason