c10l / vagrant-butcher

Delete Chef client and node when destroying Vagrant VM
MIT License
124 stars 12 forks source link

Create butcher command. #19

Open squaresurf opened 11 years ago

squaresurf commented 11 years ago

There should be a vagrant butcher command that will enable the user to run the butcher code without having to destroy the box.

--delete-guest-client-pem

There should be an optional --delete-guest-client-pem flag that will delete the /etc/chef/client.pem file from the guest machine. If no flag is specified the guest machine will be left alone. This of course will require the machine to be running.

This flag should work even if the butcher fails. For example, if you butcher without the flag, then realize you want to delete the client.pem; you will need to rerun this command with the flag. The next run should end with a butcher error, but still delete the client.pem.

The flag is useful due to the fact that chef will use the client key the machine next time guest is provisioned. This will cause the provision to fail since the client has been butchered from the chef server.

benlangfeld commented 10 years ago

:+1: