Last Modified
2015-08-25 09:57:00 -0400
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.

This fact is structured. Values are returned as a group of key-value pairs.

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.