Skip to content

Instantly share code, notes, and snippets.

@Staggerlee011
Created November 20, 2017 16:21
Show Gist options
  • Save Staggerlee011/5cd3a98d49149850cb052d89afffacd0 to your computer and use it in GitHub Desktop.
Save Staggerlee011/5cd3a98d49149850cb052d89afffacd0 to your computer and use it in GitHub Desktop.
Collection of knife commands for Roles by example
# help
knife role --help
# List all roles
knife role list
# Details of role
knife role show myrole
# Create a role from a file
knife role from file chef-repo\roles\myrole.rb
# Delete a role
knife role delete myrole
# Add a role to a node
knife node run_list set <node> "role[myrole]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment