[chef] Re: Delete node and client when destroying Vagrant VM


Chronological Thread 
  • From: Jesse Nelson < >
  • To: chef < >
  • Subject: [chef] Re: Delete node and client when destroying Vagrant VM
  • Date: Thu, 6 Dec 2012 23:04:00 +0900

You can check out the code in my chef-sandbox  that does this using the vagrant provisioner class and chef client code directly (no syscall:


Change:
::Chef::Config.from_file(File.join( File.dirname(__FILE__), 'chef', 'knife.rb'))

To point to your knife.rb location.
Pop the rest in your vagrant file, and you should be good.


On Thu, Dec 6, 2012 at 9:03 PM, Cassiano Leal < " target="_blank"> > wrote:
I was trying to find a solution for that on the web, and the two references that made more sense were:


Neither worked out of the box, so I hacked my own solution, adapting a bit from each, and came to this:


Feel free to use it if you find it useful. Comments and suggestions are welcome.

Cheers!
-- 
Cassiano Leal





Archive powered by MHonArc 2.6.16.

§