Skip to content

Instantly share code, notes, and snippets.

@bakins
Last active August 29, 2015 14:01
Show Gist options
  • Save bakins/bda46eff346c85aa3a17 to your computer and use it in GitHub Desktop.
Save bakins/bda46eff346c85aa3a17 to your computer and use it in GitHub Desktop.
Horrible ohai workaround
# I need to support a few versions of chef and some custom ohai plugins
# our ohai 6 plugins didn't work in ohai 7, so here's a horrible hack to have a node
# sync/load the plugins based on ohai version if using the ohai cookbook
# this is in my cookbook "base". put ohai-6 plugins in files/default/ohai-6, and
# ohai-7 ones in files/default/ohai-7
node.default['ohai']['plugins']['base'] = 'ohai-' + (Ohai::VERSION.split('.')[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment