Last active
March 10, 2017 02:46
-
-
Save blackknight36/0035bc27e2f0f4b86c13f9657cd942e0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Facter.add(:sensor_list) do | |
confine :kernel => 'Linux' | |
if Facter.value(:virtual) == 'physical' | |
sensors = Facter::Core::Execution.exec("sensors | egrep '.*-.*-'") | |
sensors.split("\n") if sensors != nil | |
else | |
sensors = nil | |
sensors | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment