I always forget that .kitchen.yml is passed through ERb, so this may be
even easier. In your .kitchen.yml:
<% if ENV[‘UPGRADE’] == ‘true’ %>
<% else %>
<% end %>
… and then run kitchen twice but changing your environ meant variable:
kitchen converge && kitchen verify
Disclaimer: haven’t tried it yet, but peeking at the code leads me to
believe this should work!
On Fri, Mar 20, 2015 at 21:41 Adam Leff firstname.lastname@example.org wrote:
It’s a wee-bit hackish, but I’ve used .kitchen.local.yml for this purpose,
populating it with the override stuff, naming it something different, and
then moving it into place when needed.
- run kitchen verify
- mv kitchen-phase2 .kitchen.local.yml
- run kitchen converge && kitchen verify
- mv .kitchen.local.yml kitchen-phase2
Okay… not “wee-bit hackish,” it’s ugly as sin But it may help you
On Fri, Mar 20, 2015 at 21:35 Bill Warner email@example.com wrote:
Is it possible to have kitchen run chef on a new machine twice with
different node attributes?
My primary goal is to test an upgrade feature of a cookbook. do one run
with the old version then do another run with a new version.
If it is possible my google skills have failed me and I need some
assistance in finding it.