[chef] Re: Re: Re: Re: Re: Re: comparing local cookbooks to server


Chronological Thread 
  • From: John Keiser < >
  • To: " " < >
  • Subject: [chef] Re: Re: Re: Re: Re: Re: comparing local cookbooks to server
  • Date: Tue, 19 Feb 2013 22:05:30 +0000
  • Accept-language: en-US

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).

--John



On Tue, Feb 19, 2013 at 12:33 PM, John Keiser < " target="_blank"> > 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. :)
Thanks


--
John Alberts



Archive powered by MHonArc 2.6.16.

§