Skip to content

Instantly share code, notes, and snippets.

@ctrabold
Created December 15, 2010 21:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ctrabold/742672 to your computer and use it in GitHub Desktop.
Save ctrabold/742672 to your computer and use it in GitHub Desktop.
shef console - changing a role on many nodes in a snap
$ shef -z -c ~/.chef/knife.rb
chef > pp nodes.transform(:platform => "ubuntu*") {|n| n.run_list << "role[ubuntu]"} and nil
chef > pp nodes.transform(:platform => "ubuntu*") {|n| n.run_list.remove "role[base]"} and nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment