lserman / capistrano-elbas

Deploy Rails apps to AWS AutoScale groups
MIT License
96 stars 67 forks source link

add filter ami creation to only deployed instances #51

Open jfcampos1 opened 1 year ago

jfcampos1 commented 1 year ago

When you have a configuration file with multiple servers if you filter servers with roles like this ones:

autoscale 'app-autoscale-group', user: 'apps', roles: [:app, :web]
autoscale 'worker-autoscale-group', user: 'apps', roles: [:worker]

If you do in deploy: cap ROLES=worker production deploy

Will create a new AMI for all autoscaling groups in the configuration.

I've added this PR to fix it :smile: , selecting ami creation to only deployed servers.