You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turns out this is an ancient issue — capistrano won't scope roles of the nested task to the roles you specified on the caller task. Capistrano mailing list has a bunch of info on this, for example here is one possible solution. Worked ok for me to wrap each roundsman task in with_role block.
However, README is mistaken about this, and should be updated.
I converting almost all of roundsman capistrano tasks to methods. I'm happy with the results, but feel I may have been able to use roundsman unchanged if I understood capistrano more.
Also of note, roles are ignored when running with a HOSTS environment variable. So I could installing a run_list into the wrong computer. fixed this by defining the run_list in the roles section. (it introduced minor other problems, but works very well for my process)
I have a task similar to this:
And roles like this
When I run cap provision:redis, I expect it to run
recipe[redis::server]
only on redis01 host (as per README). Instead, it runs on every host.I made a sanity check by adding this test task.
Running cap foo only ran this task on redis server, as expected.
The text was updated successfully, but these errors were encountered: