knife-role
- Group common configuration settings
knife role sub-command (options)
The following role
subcommands are available:
knife role list (options)
-w
, --with-uri
List roles.
knife role show ROLE (options)
-a
, --attribute ATTR
Show a specific role.
knife role create ROLE (options)
-d
, --description
Create a new role.
knife role edit ROLE (options)
Edit a role.
knife role from file FILE (options)
Create or update a role from a role Ruby DSL (.rb
) or JSON file.
knife role delete ROLE (options)
Delete a role.
knife role bulk delete REGEX (options)
Delete roles on the Chef Server based on a regular expression. The regular expression (REGEX) should be in quotes, not in //'s.
Roles provide a mechanism to group repeated configuration settings. Roles are data structures that contain default_attributes, and override_attributes, which are nested hashes of configuration settings, and a run_list, which is an ordered list of recipes and roles that should be applied to a host by chef-client.
default_attributes will be overridden if they conflict with a value on a node that includes the role. Conversely, override_attributes will override any values set on nodes that apply them.
When chef-client(8) configures a host, it will "expand" the run_list included in that host's node data. The expansion process will recursively replace any roles in the run_list with that role's run_list.
knife-node(1) knife-environment(1) http://wiki.opscode.com/display/chef/Roles http://wiki.opscode.com/display/chef/Attributes
Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.
This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.
Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home