Information Technology Reference
In-Depth Information
Chef-Client Recipes
Now let's perform a Chef run adding two recipes to the run-list we touched on in Chef-Client
Cookbook :
1. chef-client::default recipe—Configures chef-client to run as a service
2. chef-client::delete_validation recipe—Deletes the /etc/chef/validation.pem
file
Use knife node run_list add to add the chef-client::delete_validation recipe to
the node's run list. For all knife command lines, recipes are referenced in a run list in the
form "recipe[<cookbook>::<recipe>]" ; for example, "recipe[chef-cli-
ent::delete_validation]" .
Run the following knife node run_list add command to add "recipe[chef-cli-
ent::delete_validation]" to the node-centos65.vagrantup.com node's run list that we
bootstrapped in Chapter 9 :
$ knife node run_list add node-centos65.vagrantup.com \
"recipe[chef-client::delete_validation]"
node-centos65.vagrantup.com:
run_list: recipe[chef-client::delete_validation]
NOTE
If you need a reminder of what the node name is, run the following command:
$ knife node list
node-centos65.vagrantup.com
Also add the chef-client::default recipe to the run list. Note that you can use a short-
hand notation using just the cookbook name, when you want to use the default recipe. Run
the following command now:
Search WWH ::




Custom Search