Skip to content

Instantly share code, notes, and snippets.

@gondoi
Created March 27, 2012 02:23
Show Gist options
  • Save gondoi/2211856 to your computer and use it in GitHub Desktop.
Save gondoi/2211856 to your computer and use it in GitHub Desktop.
pychef pseudo code
from pychef import Node
n = Node.init("foo")
n["mysql"]["tunable"]["key_buffer_size"] = "64M"
# or
attributes = { "mysql" : { "tunable" : { "key_buffer_size" : "64M" } } }
n.add_override(attributes)
run_list = "role[bigrole], recipe[chef-client::service]"
n.add_run_list(run_list)
environment = "prod"
n.update_role(environment)
n.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment