Created
May 2, 2012 14:51
-
-
Save ctgswallow/2577139 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rb = ruby_block "wait_for_myself" do | |
action :nothing | |
block do | |
Chef::Log.info "Waiting for service registration to complete" | |
providers = all_providers_for_service("rabbitmq-disk-member") | |
found = false | |
until found | |
providers.each do |n| | |
n.hostname == node.hostname && found = true | |
Chef::Log.info "still waiting... #{providers.join(", ")}" | |
providers = all_providers_for_service("rabbitmq-disk-member") | |
end | |
end | |
end | |
end | |
rb.run_action(:create) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment