I am actually still unable to find any docs of the ROLES env variable, or " ROLE(S)FILTER" (not even sure what that means!). Can anyone point me to the right place? ________________________________________ From: capistrano@googlegroups.com [capistrano@googlegroups.com] on behalf of Jonathan Rochkind [rochk...@jhu.edu] Sent: Wednesday, December 05, 2012 9:40 AM To: capistrano@googlegroups.com Subject: RE: [capistrano] precompile assets task, roles
Ah, okay, I'll look around for docs. (ROLES seemed to do what I needed at first, but clearly not! Still confused on what it does, but i'll look around, although had trouble finding docs before, I just got it from someone elses (misleading) blog post). What I _want_ to do is "Run only the tasks applicable for role X, on the servers for role X. Pretend nothing but role X exists." Make sense? Is there no way to do it? Am I a unique snowflake, or is this a common use case? (It seems to me like it would be common). I am indeed using custom roles -- but I don't want to have to remember the current configuration of which servers have which roles (nor do I neccesarily want to run ALL tasks on that server(s), I just want the run the ones for certain roles). Is there any way to set that up? If not, and I'm not a unique snowflake, would the capistrano committers look kindly on a pull request to add the feature, if I can figure out how? Any comments on what the end-user-facing cli api should look like (since ROLES is apparently already taken!) ________________________________________ From: capistrano@googlegroups.com [capistrano@googlegroups.com] on behalf of Donovan Bray [donno...@gmail.com] Sent: Tuesday, December 04, 2012 11:55 PM To: capistrano@googlegroups.com Subject: Re: [capistrano] precompile assets task, roles ROLES probably doesn't do what you think it does; look at the docs for ROLE(S)FILTER as well. I've never found either to be useful so I avoid them like the plague. Instead I build custom roles. I define stages in tasks and use the server helper instead of the role helper. On Dec 4, 2012, at 3:15 PM, Jonathan Rochkind <rochk...@jhu.edu> wrote: > Huh, actually, it looks like this IS working as expected normally... > > Where it broke is when I ran: > > `cap ROLES=indexer_jobs deploy` > > Somehow when you tell it to only run on servers with listed role... THEN it > messes up and runs tasks that don't apply to that role on those servers too? > Maybe? Ring a bell for anyone? Is this a bug? > > On 12/4/2012 6:13 PM, Jonathan Rochkind wrote: >> My cap recipe for a Rails app has just grown to more than one server; >> >> I now have a server where the source is installed (in order to then set >> some rake cronjobs on that server), but it's not actually an app/web >> server. >> >> So I don't want asset precompile to run there. >> >> But asset precompile seems to be running there anyway. Looking at the >> actual code at: >> https://github.com/capistrano/capistrano/blob/master/lib/capistrano/recipes/deploy/assets.rb >> >> >> I'm not sure why... it looks like it should only run the >> assets:precompile task on servers with role `assets_role`, which >> defaults to `web`. >> >> This server does not have the role 'web', in fact it only has one role, >> one custom one I made up ("indexer_jobs")... but the assets:precompile >> task seems to be triggered there anyway. >> >> Anyone have any clues what might be going on, or suggestions for how I >> can get to the bottom of this? >> > > -- > * You received this message because you are subscribed to the Google Groups > "Capistrano" group. > * To post to this group, send email to capistrano@googlegroups.com > * To unsubscribe from this group, send email to > capistrano+unsubscr...@googlegroups.com 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 capistrano@googlegroups.com * To unsubscribe from this group, send email to capistrano+unsubscr...@googlegroups.com 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 capistrano@googlegroups.com * To unsubscribe from this group, send email to capistrano+unsubscr...@googlegroups.com 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 capistrano@googlegroups.com * To unsubscribe from this group, send email to capistrano+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en