-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
on roles(:role_name) blocks are not skipped correctly #740
Comments
Happy to take a PR if you can make it work without breaking backwards
|
I will have a look but I am not familiar with the code. This workaround seems to work though! - on roles(:cloud) do |host|
next unless host |
I suppose the question is what should happen in this case: on [] do |host|
puts "this should never run!!!!"
end As in that event, |
Closing, although I admit this is a problem, because I think it was fixed by a recent PR. I'd be really, really glad to see this fixed, and I really thought it was. |
I have this in my task:
When I run it for a server that does not have :agent in the role list, I see this:
I think it would make a lot more sense if the entire block is skipped, otherwise expensive calculations, local database operations, file preparations, all kinds of local stuff is still ran when it should really be skipped.
The text was updated successfully, but these errors were encountered: