Skip to content

Instantly share code, notes, and snippets.

@JSONOrona
Created March 6, 2023 23:26
Show Gist options
  • Save JSONOrona/c20bdf082e39cea2913c40ca51103857 to your computer and use it in GitHub Desktop.
Save JSONOrona/c20bdf082e39cea2913c40ca51103857 to your computer and use it in GitHub Desktop.

Helpful Knife Commands and More

Knife

Show nodes runlist and metadata

knife node show <node_name> 

# Example:

knife node show tcx-dclap01192

Search for a Node by Hostname or IP

knife search node "hostname:*tcx-dclap01192*"

knife search node "ipaddress:*10.61.66.128*"

Chef Client

Run a single recipe and override run list

chef-client -o 'recipe[the_recipe::install]'

# Example:

chef-client -o 'recipe[ids_oneagent::default]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment