Skip to content

Instantly share code, notes, and snippets.

@adamhjk
Created March 18, 2010 01:41
Show Gist options
  • Save adamhjk/335954 to your computer and use it in GitHub Desktop.
Save adamhjk/335954 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'chef'
require 'chef/config'
require 'chef/node'
Chef::Config.from_file("/home/stuff/.chef/knife.rb")
# Load and save a node
node = Chef::Node.load('somenode')
node.set[:something] = "to something else"
node.save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment