Relocate .kitchen directory


#1

I’m having a hard time trying to figure out how to save the .kitchen directory outside of the root folder.

I use Dropbox to sync my dev files between desktop and laptop. When I make a change or converge, it syncs the .kitchen folder with all the vagrant configs but then kitchen stops working on my other computer.

I just want to change where kitchen looks for the .kitchen directory so I can store in ~/.kitchen instead.

Thanks


#2

To the best of my knowledge this is not supported, nor does it make any sense. It’s not a config folder, it contains the runtime state for the current cookbook and is not built such that the state files are globally unique. Either block that folder from your sync system or use something like git or mercurial for moving files between machines.


#3

Thanks Noah, I guess storing it in ~/.kitchen doesn’t make sense, but if it was supported I could specify a unique directory for each cookbook ~/.kitchen/my-cookbook for example.

Yes git is an option, just having to remember to commit each time before moving machines - I would prefer to use Dropbox in this instance.


#4

Just throwing an idea, but can’t you make a symlink between your cookbook .kitchen and a directory elsewhere (same path on both machines) ?


#5

@Tensibai thanks for the suggestion but sym links actually get followed by Dropbox so it would sync the directory anyway. I use it a lot to sync stuff outside of the Dropbox directory.

I have now just used Dropbox’s selective sync to remove the .kitchen folder from syncing. It’s not ideal, but a solution none the less :slight_smile: