dhcp-server

Configure and manage a DHCP server. If the either the uplink or local interface use the wifi interface, this should be set up on the node before the role is run.

Tasks

Everything is in the tasks/main.yml file.

Available variables

Main variables are:

  • eth_local_mac_address: Local MAC address for the DHCP server. It is required to rename the interface using udev rules

  • eth_local_address: Local IP address for the DHCP server.

  • eth_local_netmask: Local netmask for the DHCP server.

  • eth_local_gateway: Local IP gateway for the DHCP server. Only define this if you are not defining the uplink variables.

  • eth_local_vlan: VLAN ID of the local interface, on the trunk device with eth_local_mac_address.

  • eth_local_bridge_members: List of additional members on the local bridge.

  • eth_local_bridge_members.[].mac_address: MAC Address of the interface to add to the bridge.

  • eth_local_bridge_members.[].vlan: Optional VLAN ID to add to the bridge. The MAC address should then be the same as the uplink / local MAC, that also uses VLANs.

  • eth_uplink_mac_address: Uplink MAC address for the DHCP server. If defined, this machine will act as a gateway and does masquerading. It is required to rename the interface using udev rules.

  • eth_uplink_static: Boolean value. If false, the DHCP server uses DHCP to get an IP from the uplink.

  • eth_uplink_static_address: Static uplink IP address. Requires eth_uplink_static true.

  • eth_uplink_static_netmask: Static uplink net mask. Requires eth_uplink_static true.

  • eth_uplink_static_gateway: Static uplink IP gateway. Requires eth_uplink_static set to true.

  • eth_uplink_wifi_ssid: SSID to connect to, when the uplink is WiFi.

  • eth_uplink_wifi_psk: WiFi password.

  • eth_uplink_dns_server: Upstream DNS server to use. (Default: DHCP)

  • eth_uplink_vlan: VLAN ID of the uplink interface, on the trunk device with eth_uplink_mac_address.

  • additional_vlans: Additional VLANs to configure devices for on the interface using VLANs. List of Dictionaries.

  • additional_vlans.[].vlan: VLAN ID.

  • additional_vlans.[].address: IP Address for the VLAN interface.

  • additional_vlans.[].netmask: IP netmask for the VLAN interface.

  • dhcp_range: Allowed IP range for the DHCP server. Syntax: $start-addr,$end-addr,$netmask,$broadcast,$lease time.

  • domain: DNS domain for the DCHP server.

  • staticips.hosts: For the layout of the staticips.hosts variable, see the staticips role.

  • default_install_disk: Default PXE install target disk.