Information Technology Reference
In-Depth Information
NOTE
In Chef code, a string prefaced by a single colon (:) is called a symbol . In other languages
this is equivalent to a string constant.
Now let's perform a Chef run using the cleanup.rb recipe on Linux/Mac OS X:
$ sudo chef-apply cleanup.rb
Recipe: (chef-apply cookbook)::(chef-apply recipe)
* file[/Users/misheska/stone.txt] action delete
- delete file /Users/misheska/stone.txt
or, in Windows (Run As Administrator):
> chef-apply cleanup.rb
Recipe: (chef-apply cookbook)::(chef-apply recipe)
* file[C:/Users/misheska/stone.txt] action delete
- delete file C:/Users/misheska/stone.txt
NOTE
In Chef, using relative paths with :delete is problematic on some platforms, so just de-
lete the hello.txt file by hand that you created in the first exercise.
We've cleaned up the stone.txt we created in this final hands-on exercise in the chapter.
chef-apply deleted stone.txt .
Summary
In this chapter we introduced the chef-apply command, showing you how to run .rb files
containing Chef code.
We introduced the following Chef concepts and terminology:
Search WWH ::




Custom Search