2

We have a series of cookbooks that are common across many environments. Up until recently, they've always been on different machines. Now we have a requirement that we need to run the same series of cookbooks across two environment files on the same machine.

What is the best practice here for doing this? Simply calling:

knife winrm %server% chef-client -m -x %user% -P %pass% -E %environment%

Is that the same as:

Knife node edit %server% 

And changing the environment there? We need to be able to do command line switching of environments. Please advise, TIA!

mumbles
  • 989
  • 2
  • 8
  • 19

1 Answers1

0

The tool you are looking for is knife-flip by John Cowie from Etsy:

$ knife node flip mynode.foo.com myenv [--preview]
sethvargo
  • 26,739
  • 10
  • 86
  • 156
  • 1
    Went to install knife-flip and get an cygwin heap error on my Windows7 box. Just wanted to add that this can be fixed using:http://stackoverflow.com/questions/19259272/error-installing-gem-couldnt-reserve-space-for-cygwins-heap-win32-error-487 – mumbles Aug 05 '14 at 04:14