
Chef Infrastructure Automation Cookbook Second Edition
By :

You know how annoying this is: you tweak a cookbook, upload it to your Chef server, start a Chef run on your node and, boom! It fails. What's even more annoying is that it fails not because a black hole absorbed your node and the whole data center that node lives in, but because you missed a mundane comma in the default recipe of the cookbook you just tweaked. Fortunately, there's a very quick and easy way to find such simple glitches before you go all in and try to run your cookbooks on real nodes.
Install the ntp
cookbook by running the following code:
mma@laptop:~/chef-repo $ knife cookbook site install ntp
Installing ntp to /Users/mma/work/chef-repo/cookbooks …TRUNCATED OUTPUT… Cookbook ntp version 1.7.0 successfully installed
Carry out the following steps to test your cookbooks:
Run knife cookbook test
on a working cookbook, for example, the ntp
cookbook:
mma@laptop:~/chef-repo $ knife cookbook test ntp
checking ntp Running syntax...
Change the font size
Change margin width
Change background colour