May 2015
Intermediate to advanced
278 pages
5h 34m
English
To create simple recipes, you only need to use resources provided by Chef such as template, remote_file, or service. However, as your recipes become more elaborate, you'll discover the need to do more advanced things such as conditionally execute parts of your recipe, looping, or even complex calculations.
Instead of declaring the gem_package resource ten times, simply use different name attributes; it is so much easier to loop through an array of gem names creating the gem_package resources on the fly.
This is the power of mixing plain Ruby with Chef Domain Specific Language (DSL). We'll see a few tricks in the following sections.
Start a Chef-shell on any of your nodes in Client mode to be able to access ...
Read now
Unlock full access