Initial commit, squashed
This commit is contained in:
commit
158e8740b8
83 changed files with 2718 additions and 0 deletions
16
roles/exit/templates/isc-dhcp-relay.j2
Normal file
16
roles/exit/templates/isc-dhcp-relay.j2
Normal file
|
@ -0,0 +1,16 @@
|
|||
{% set bridge = interfaces | selectattr('type') | selectattr('type.value', '==', 'bridge') | first %}
|
||||
{% set dhcp_networks = query('netbox.netbox.nb_lookup', 'prefixes', api_filter='role=dhcp-pool', raw_data=true)
|
||||
| selectattr('vlan') | map(attribute='vlan.vid') | sort -%}
|
||||
|
||||
# What servers should the DHCP relay forward requests to?
|
||||
SERVERS="{{ dhcp }}"
|
||||
|
||||
# On what interfaces should the DHCP relay (dhrelay) serve DHCP requests?
|
||||
# Always include the interface towards the DHCP server.
|
||||
# This variable requires a -i for each interface configured above.
|
||||
# This will be used in the actual dhcrelay command
|
||||
# For example, "-i eth0 -i eth1"
|
||||
INTF_CMD="{{ bridge.tagged_vlans | map(attribute='vid') | intersect(dhcp_networks) | sort | map('regex_replace', '^', '-id bridge.') | join(' ') }} -iu {{ iface_uplink }} -iu peerlink.4"
|
||||
|
||||
# Additional options that are passed to the DHCP relay daemon?
|
||||
OPTIONS="-U outside"
|
Loading…
Add table
Add a link
Reference in a new issue