[chef] Re: Physical vs. VMware guests in recipe


Chronological Thread 
  • From: Jesse Nelson < >
  • To: chef < >
  • Subject: [chef] Re: Physical vs. VMware guests in recipe
  • Date: Thu, 21 Mar 2013 18:26:58 -0700

I did this in the past with a small helper methods in a library. 
That wraps the same logic but can be a bit easier to follow in your recipes. 

xen specific but easy to update to your needs. 




On Thu, Mar 21, 2013 at 12:51 PM, Jeff Blaine < " target="_blank"> > wrote:
We're not about to differentiate physical nodes from VMs as role
definitions, so my logic has gone into a recipe that runs everywhere,
but does nothing on physical hosts.

Is the following a sane way to do that? It's working, but
that doesn't mean it's the ideal method.

# recipes/default.rb
return if node['virtualization'].nil?
return if node['virtualization']['system'] != 'vmware'
return if node['virtualization']['role'] != 'guest'
# actual code here for VMs that are guests...




Archive powered by MHonArc 2.6.16.

§