Skip to content

Instantly share code, notes, and snippets.

@iversond iversond/app.rb
Created Mar 2, 2018

Embed
What would you like to do?
Custom facter fact to return the first 2 characters as the Fact `app`
Facter.add(:app) do
setcode do
app = Facter.value(:hostname)[0..1]
if app.downcase.match(/lm/)
app = "hr"
end
app.downcase
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.