def get_interfaces # rubocop:disable Naming/AccessorMethodName
      pref = facts[:ansible_default_ipv4] &&
             facts[:ansible_default_ipv4]['interface']
      if pref.present?
        (facts[:ansible_interfaces] - [pref]).unshift(pref)
      else
        ansible_interfaces
      end
    end
def get_interfaces # rubocop:disable Naming/AccessorMethodName
      pref = facts[:ansible_default_ipv4] &&
             facts[:ansible_default_ipv4]['interface']
      if pref.present?
        (facts[:ansible_interfaces] - [pref]).unshift(pref)
      else
        ansible_interfaces
      end
    end
Move ansible's default interface first in the list of interfaces since
 Foreman picks the first one that is usable. If ansible has no
 preference otherwise at least sort the list.

 This method overrides app/services/fact_parser.rb on Foreman and returns
 an array of interface names, ['eth0', 'wlan1', etc...]