Skip to content

Instantly share code, notes, and snippets.

@ctgswallow
Created May 2, 2012 14:51
Show Gist options
  • Save ctgswallow/2577139 to your computer and use it in GitHub Desktop.
Save ctgswallow/2577139 to your computer and use it in GitHub Desktop.
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