FYI if you’re only looking to find out what is different (not the actual changes), you can also do
knife diff —name-status /cookbooks
(The command line parameters are modeled off of git diff.)
Another thing: once you discover which things are different and decide which changes you want to keep / which you want to discard, you can use knife upload and knife download to do it (same command line parameters). Upload cookbooks/roles/etc. to the server with knife upload, or copy the server contents down with knife download. Knife upload /cookbooks will upload all cookbooks, knife upload /cookbooks/apache2 will upload apache2 only, knife download works the same way. If your current directory is the cookbooks directory, knife upload . Or knife upload apache2 will work (it’s aware of the current directory).
From: John Alberts <email@example.com:firstname.lastname@example.org>
Reply-To: "email@example.com:firstname.lastname@example.org" <email@example.com:firstname.lastname@example.org>
Date: Tuesday, February 19, 2013 10:58 AM
To: "email@example.com:firstname.lastname@example.org" <email@example.com:firstname.lastname@example.org>
Subject: [chef] Re: Re: Re: Re: Re: comparing local cookbooks to server
On Tue, Feb 19, 2013 at 12:33 PM, John Keiser <email@example.com:firstname.lastname@example.org> wrote:
knife diff /cookbooks should work
Yep, that works too. Though I much prefer the output of health_inspector for just a simple comparison. Nice to the know the syntax for knife diff to then see the actual changes.