What is the "right" way to deal with this problem? I'm using vagrant and some boxes come with old versions of ohai that cause failures in the chef run.The segment below in build-essentials is the current example.# Older versions of ohai do not provide a platform_family# Is crashing out with nil method error for the packages.each# statement okay or should we silently do nothing or ?packages = case node['platform_family']when "debian"%w{build-essential binutils-doc}when "rhel", "fedora"%w{gcc gcc-c++ kernel-devel make}when "suse"%w{gcc gcc-c++ kernel-default-devel make m4} # in SLES there is no kernel-develendIf packages is nil after this case statement what is the correct action to take?Ideally, I'd like a warning to pop up like"Hey, your version of ohai is too old, please upgrade"If the chef run fails, fine but at least print a useful error message.- Booker C. Bense
Vladimir Girnet Senior Infrastructure Engineer Tacit Knowledge, Inc. http://www.tacitknowledge.com
Archive powered by MHonArc 2.6.16.