jump to navigation

Using Ohai to obtain platform September 1, 2009

Posted by John Dewey in Chef, Code, Deployment, Ohai.
trackback

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

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: