Skip to content

Instantly share code, notes, and snippets.

Created August 4, 2016 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/d3f3f77b169da8cbacd2b3b01f27091b to your computer and use it in GitHub Desktop.
Save anonymous/d3f3f77b169da8cbacd2b3b01f27091b to your computer and use it in GitHub Desktop.
module Environment
DC1 = [IPAddr.new('172.28.8.0/18'), IPAddr.new('172.28.64.0/20')]
DC2 = [IPAddr.new('172.28.136.0/18'), IPAddr.new('172.28.192.0/20')
def self.get_dc(node_ipaddress)
case node_ip_address
when *DC1 then :DC1
when *DC2 then :DC2
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment