From aed24573b8fdc68cc93d6b19b575f0986f158db1 Mon Sep 17 00:00:00 2001 From: Salt Date: Sat, 27 Feb 2021 18:42:14 -0600 Subject: [PATCH] Set up redundant DHCP Wow that was actually really easy. Love broadcast protocols --- playbooks/pis.yml | 32 +++++++++++++++++++++++++++++++ playbooks/vars/desulocal-dhcp.yml | 1 + 2 files changed, 33 insertions(+) diff --git a/playbooks/pis.yml b/playbooks/pis.yml index fe3e968..93dc194 100755 --- a/playbooks/pis.yml +++ b/playbooks/pis.yml @@ -51,4 +51,36 @@ - role: netplan-static-ip tags: [ pis, mp, dhcp, static-ip ] - role: dhcp + vars: + dhcp_global_failover_peer: failover-group + dhcp_global_failover: + role: primary + address: 192.168.103.100 + port: 647 + peer_address: 192.168.103.101 + peer_port: 647 + max_response_delay: 15 + max_unacked_updates: 10 + load_balance_max_seconds: 5 + split: 255 + mclt: 3600 + tags: [ pis, mp, dhcp ] +- hosts: pi-mp-2.desu.ltd + vars_files: + - vars/desulocal-dhcp.yml + roles: + - role: netplan-static-ip + tags: [ pis, mp, dhcp, static-ip ] + - role: dhcp + vars: + dhcp_global_failover_peer: failover-group + dhcp_global_failover: + role: secondary + address: 192.168.103.101 + port: 647 + peer_address: 192.168.103.100 + peer_port: 647 + max_response_delay: 15 + max_unacked_updates: 10 + load_balance_max_seconds: 5 tags: [ pis, mp, dhcp ] diff --git a/playbooks/vars/desulocal-dhcp.yml b/playbooks/vars/desulocal-dhcp.yml index e3da861..714bfd4 100644 --- a/playbooks/vars/desulocal-dhcp.yml +++ b/playbooks/vars/desulocal-dhcp.yml @@ -15,6 +15,7 @@ dhcp_subnets: - range_begin: 192.168.1.2 range_end: 192.168.1.254 routers: 192.168.1.1 + failover_peer: failover-group dhcp_hosts: # 1 Catch-all guest subnet - { name: router-nighthawk-1, mac: '10:0C:6B:5A:D9:40', ip: 192.168.1.1 }