Getting started

The default configuration of this role will install isc-dhcp-relay, configure it to listen on the internal network interface and forward requests to the default IPv4 gateway. A DHCP server should be running on the default IPv4 gateway; if not, you should change the dhcrelay__servers variable.

Example playbook

If you are using this role without DebOps, here's an example Ansible playbook that uses the debops.dhcrelay role:

---
- name: Manage ISC DHCP relay
  collections: [ 'debops.debops', 'debops.roles01',
                 'debops.roles02', 'debops.roles03' ]
  hosts: [ 'debops_service_dhcrelay' ]
  become: True

  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'

  roles:

    - role: dhcrelay
      tags: [ 'role::dhcrelay', 'skip::dhcrelay' ]

Other resources

It is worth checking out the dhcrelay manpage: dhcrelay(8).