Skip to content

Instantly share code, notes, and snippets.

@leejones
Last active June 30, 2016 20:24
Show Gist options
  • Save leejones/c5c1eed9764d26ee78c2cdd0d597357b to your computer and use it in GitHub Desktop.
Save leejones/c5c1eed9764d26ee78c2cdd0d597357b to your computer and use it in GitHub Desktop.
In ruby console to interact with the chef server
#!/bin/bash
# loads a pry console to interact with the chef server
# (substitute irb if pry is not available)
bundle exec knife exec -E "require 'pry'; binding.pry"
# type `ls` to see available methods
# to perform a node search for example: `nodes.search("roles:web*")`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment