Skip to content

Instantly share code, notes, and snippets.

@rbirnie
Created November 7, 2013 03:37
Show Gist options
  • Save rbirnie/7348574 to your computer and use it in GitHub Desktop.
Save rbirnie/7348574 to your computer and use it in GitHub Desktop.
Override macaddress fact to always be eth0
#!/usr/bin/ruby
# Eth0 is better than alphabetical.
require 'facter'
Facter.add(:macaddress) do
has_weight 10
setcode do
`facter macaddress_eth0`.strip
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment