Skip to content

Instantly share code, notes, and snippets.

@traylenator
Created March 12, 2013 13:20
Show Gist options
  • Save traylenator/5142815 to your computer and use it in GitHub Desktop.
Save traylenator/5142815 to your computer and use it in GitHub Desktop.
# 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