Facter.add("ipaddress_primary") do
  setcode do
    if Facter.value('ipaddress_eth0')
      Facter.value('ipaddress_eth0')
    else
      Facter.value('ipaddress')
    end
  end
end

Add a custom fact because the value of ipaddress gets messed up if you use Docker
Add a custom fact because the value of ipaddress gets messed up if you use Docker
