[chef] Omnibus 4.0 and Ohai question


Chronological Thread 
  • From: "Eric G. Wolfe" < >
  • To:
  • Subject: [chef] Omnibus 4.0 and Ohai question
  • Date: Wed, 08 Apr 2015 15:24:02 -0400

I am coming back to Omnibus and updating some software definitions
having not used Omnibus in 6 months.

I used to be able to reference Ohai['platform'] but that returns a no
method error on Omnibus 4.0

Error:

    config/software/package.rb:20:in `evaluate': undefined method `[]'
for Ohai:Module (NoMethodError)

Line causing error:

    version_name_string =
"#{Ohai['platform']}-#{Ohai['platform_version']}-#{Ohai['kernel']['machine']}-#{version_string}"

So what do I need to do to reference Ohai data in an Omnibus 4.0
software definition?

I do know in some cases there are chef-sugar helpers like `windows?`
that can be used to switch on platform conditions.  I couldn't find
relevant documentation, and if someone could point me at an example it
would be kindly appreciated.

-- 
Eric G. Wolfe
email: 

cell: 304.942.3970
twitter: @atomic_penguin

Cycle Computing
Better Answers. Faster.

http://www.cyclecomputing.com
twitter: @cyclecomputing



Archive powered by MHonArc 2.6.16.

§