Add OS variant configuration

- Debian 11 has a different TFTP path than Ubuntu 18.04

Add EFI PXE boot support with conditional

- Conditionally provide different file depending on BIOS or EFI boot
  (unsupported on BSD dhcpd implementations)

Fix galaxy metadata

Change-Id: If13d18dbf0455f8e9b27054da6f0eabbb602b71f
7 files changed
tree: 792219af7df2e38c5f580bc64907c03f2bd3270e
  1. .cookiecutter_params.json
  2. .gitreview
  3. .reuse/
  4. LICENSES/
  5. Makefile
  6. README.md
  7. VERSION
  8. defaults/
  9. filter_plugins/
  10. handlers/
  11. meta/
  12. molecule/
  13. tasks/
  14. templates/
  15. vars/
README.md

dhcpd

Installs/configure a DHCP server and TFTP server

A few assumptions are made by this role:

  • If routers is not set in the subnet dictionary (within dhcpd_subnets), then the first usable address is set as the router.

  • If routers is set and has a list of IP addresses as a part of the rfc3442routes key, RFC3442 classless static routes (option 121) will be added in addition to the standard routers (option 3)

Supports using PXE to load both traditional BIOS and EFI payloads, tested primarily with iPXE.

Configuration docs

dhcpd - ISC's docs:

tftpd - Documentation is scarce. Upstream source repo:

Also supports OpenBSD dhcpd (fork of ISC) and tftpd (BSD), which has some difference in configuration/behavior - missing conditionals, additional option definitions, etc.

Reference docs

DHCP:

TFTP:

iPXE Chainloading

Requirements

Minimum ansible version: 2.9.5

Example Playbook

- hosts: all
  vars:
    dhcpd_interfaces:
      - eth0
    dhcpd_subnets:
      "192.168.0.1/24":
        range: "192.168.0.128/25"
        dns_servers:
          - "192.168.0.1"
          - "192.168.0.2"
        dns_search:
          - "example.com"
        tftpd_server: "192.168.0.1"
        hosts:
          - name: "dns"
            ip_addr: "192.168.0.2"
            mac_addr: "a1:b2:c3:d4:e5:f6"
        routers:
          - ip: "192.168.0.1"
  roles:
    - dhcpd

ToDo

Add classless static route support for OpenBSD - see dhcp-options(5) on that system.

License and Author

© 2020 Open Networking Foundation support@opennetworking.org

License: Apache-2.0