Path: | lib/facter/dhcp_servers.rb |
Last Update: | Sat Feb 23 07:17:42 +0000 2019 |
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.