Created
March 12, 2013 13:20
-
-
Save traylenator/5142815 to your computer and use it in GitHub Desktop.
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
# LSF Information | |
# Rus lsid to determin the name of the LSF master. | |
if Facter.value(:id) == "root" and File.exists?('/usr/bin/lsid') | |
Facter.add("lsf_lsid_master") do | |
setcode do | |
output = Facter::Util::Resolution.exec('/usr/bin/lsid') | |
if not output.nil? | |
output.grep(/My master name is \S+$/)[0].split.last | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment