Skip to content

Instantly share code, notes, and snippets.

@steveberryman
Forked from chef/chef_rest_delete.rb
Created February 14, 2009 13:09
Show Gist options
  • Save steveberryman/64358 to your computer and use it in GitHub Desktop.
Save steveberryman/64358 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'chef'
require 'chef/rest'
Chef::Log.debug("Authenticating via openid")
response = @rest.post_rest('openid/consumer/start', {
"openid_identifier" => "#{Chef::Config[:openid_url]}/openid/server/node/program_auth",
"submit" => "Verify"
})
@rest.post_rest(
"#{Chef::Config[:openid_url]}#{response["action"]}",
{ "password" => 'your_pw' }
)
Chef::REST.delete_rest("#{Chef::Config[:registration_url]}/nodes/#{'your node name'}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment