-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bring train platform data more in line with ohai's platform data
This includes - `family` refers to the distribuion family while `name` refers to the spcific distribution. For example, the family attribute for ubuntu is `debian`. - The `redhat` family has been renamed `rhel` - Fedora is not listed as a `rhel` platform.
- Loading branch information
1 parent
b644f6f
commit c2b2963
Showing
6 changed files
with
72 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# encoding: utf-8 | ||
# author: Dominik Richter | ||
# author: Christoph Hartmann | ||
# | ||
# This is heavily based on: | ||
# | ||
# OHAI https://github.com/chef/ohai | ||
# by Adam Jacob, Chef Software Inc | ||
# | ||
module Train::Extras | ||
module Uname | ||
def uname_s | ||
@uname_s ||= backend.run_command('uname -s').stdout | ||
end | ||
|
||
def uname_r | ||
@uname_r ||= begin | ||
res = backend.run_command('uname -r').stdout | ||
res.strip! unless res.nil? | ||
res | ||
end | ||
end | ||
|
||
def uname_m | ||
@uname_m ||= backend.run_command('uname -m').stdout.chomp | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters