Skip to content
Ohai profiles your system and emits JSON
Branch: master
Clone or download
chef-ci Update CHANGELOG.md to reflect the promotion of 15.0.35
Obvious fix; these changes are the result of automation not creative thinking.
Latest commit 62a8798 May 10, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.expeditor Run the specs as well Apr 24, 2019
.github
bin Remove the remaining rubygems checking code Dec 4, 2017
ci [ci] bundle install into system gems Jul 23, 2014
lib Bump version to 15.0.35 by Chef Expeditor May 10, 2019
spec Changing quotes to satisfy style Apr 13, 2019
.gitignore Detect virtualization on newer AWS instance types. (m5) May 24, 2018
.rspec Use rspec3 compatible cli options Jun 9, 2014
.rubocop.yml Bump Rubocop to the 2.5 engine Nov 24, 2018
.travis.yml Bump ruby releases in Travis Mar 18, 2019
CHANGELOG.md Update CHANGELOG.md to reflect the promotion of 15.0.35 May 10, 2019
CODE_OF_CONDUCT.md Add Chef code of conduct link Nov 29, 2018
Gemfile More rake / Travis updates Sep 9, 2018
LICENSE Reference Chef Inc from the license file Nov 8, 2015
NOTICE Use Chef vs. Chef Software Nov 8, 2015
OHAI_MVPS.md Make Phil Dibowitz the Ohai 14.6 MVP Oct 11, 2018
README.md Fix link in readme Apr 22, 2019
RELEASE_NOTES.md Add Ohai 15.0 release notes Apr 30, 2019
Rakefile Use a more standardized Rakefile Sep 9, 2018
VERSION Bump version to 15.0.35 by Chef Expeditor May 10, 2019
appveyor.yml Update appveyor / travis configs and add lockbot Jan 23, 2019
ohai.gemspec Loosen the mixlib pins to allow for new major releases Mar 18, 2019

README.md

ohai

Build Status Master Build Status Master Gem Version

Umbrella Project: Chef Infra

Project State: Active

Issues Response SLA: 10 business days

Pull Request Response SLA: 10 business days

Description

Ohai detects data about your operating system. It can be used standalone, but its primary purpose is to provide node data to Chef.

Ohai will print out a JSON data blob for all the known data about your system. When used with Chef, that data is reported back via node attributes.

Chef distributes ohai as a RubyGem. This README is for developers who want to modify the Ohai source code. For users who want to write plugins for Ohai, see the docs:

Development Environment:

Ohai's development dependencies should be installed with bundler. Just run bundle install in the root of the repo.

Spec Testing:

We use RSpec for unit/spec tests. To run the full suite, run:

bundle exec rake spec

You can run individual test files by running the rspec executable:

bundle exec rspec spec/unit/FILE.rb

Style:

We use Chefstyle, as a code linter, to enforce style guidelines. To run:

bundle exec rake style

You can run and automatically correct the issues:

bundle exec rake style:auto_correct

Rake Tasks

Ohai has some Rake tasks for doing various things.

bundle exec rake -T
rake build               # Build ohai-$VERSION.gem into the pkg directory
rake clean               # Remove any temporary products
rake clobber             # Remove any generated files
rake docs                # Generate YARD Documentation
rake install             # Build and install ohai-$VERSION.gem into system gems
rake install:local       # Build and install ohai-$VERSION.gem into system gems without network access
rake release[remote]     # Create tag $VERSION and build and push ohai-$VERSION.gem to rubygems.org
rake spec                # Run RSpec code examples
rake style               # Run Chefstyle tests
rake style:auto_correct  # Auto-correct RuboCop offenses

($VERSION is the current version, from the GemSpec in Rakefile)

Links:

Source:

Issues:

Contributing

For information on contributing to this project see https://github.com/chef/chef/blob/master/CONTRIBUTING.md

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Run the tests bundle exec rake spec
  5. Run the style tests bundle exec rake style
  6. Push to the branch (git push origin my-new-feature)
  7. Create new Pull Request

License

Ohai - system information application

  • Author:: Adam Jacob (adam@chef.io)
  • Copyright:: Copyright (c) 2008-2019 Chef Software, Inc.
  • License:: Apache License, Version 2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You can’t perform that action at this time.