jump to navigation

Using Ohai to obtain platform September 1, 2009

Posted by John Dewey in Chef, Code, Deployment, Ohai.
add a comment

I have found myself needing to know the operating system platform. Rather than explicitly checking for /etc/lsb-base or /etc/issue to determine if it’s Ubuntu or Debian respectively. Let Ohai do the work for you.

This small gist prints the platform. You can access just about anything you want to know about your system via this method.

Advertisements