Created
March 16, 2017 17:50
-
-
Save dnase/f363a8136ae80954c1639cdcebdd5e7c 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
Facter.add(:cloud) do | |
setcode do | |
ip = Facter.value(:ipaddress) | |
octets = ip.split('.') | |
case octets[2] | |
when '5' | |
'Oracle' | |
when '9' | |
'Azure' | |
else | |
'Unknown' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment