Last active
December 10, 2015 04:38
-
-
Save btm/4382499 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Accessing dmi information in the chef-shell | |
| # must use 'sudo shef' or 'sudo chef-shell' for dmidecode | |
| chef > if node[:dmi] && node[:dmi][:system] && node[:dmi][:system][:manufacturer] =~ /VMware/ | |
| chef ?> puts "On a VMWare Guest" | |
| chef ?> end | |
| On a VMWare Guest | |
| => nil | |
| chef > node.automatic[:dmi] = nil | |
| => nil | |
| chef > if node[:dmi] && node[:dmi][:system] && node[:dmi][:system][:manufacturer] =~ /VMware/ | |
| chef ?> puts "On a VMWare Guest" | |
| chef ?> end | |
| => nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment