Last Modified
2014-09-11 00:16:17 +0000
Requires
  • facter
  • facter/util/dhcp_servers

Description

Fact: dhcp_servers

Purpose:

Return the DHCP server addresses for all interfaces as a hash.
If the interface that is the default gateway is dhcp assigned, there
will also be a 'system' entry in the hash.

Resolution:

Parses the output of nmcli to find the DHCP server for the interface if available

Caveats:

Requires nmcli to be available and the interface must use network-manager.