fabric: consolidate interface templates

Mostly to avoid special‐casing bond interfaces, and to support BGP
connections over virtual interfaces.
This commit is contained in:
Timotej Lazar 2024-02-27 10:59:06 +01:00
parent 5381fecaa4
commit ce7c1bd49e
6 changed files with 28 additions and 40 deletions

View file

@ -42,8 +42,8 @@
- name: Set up peerlink
template:
dest: "/etc/network/interfaces.d/bond.intf"
src: "bond.intf.j2"
dest: "/etc/network/interfaces.d/peerlink.intf"
src: "peerlink.intf.j2"
mode: 0644
notify: reload interfaces
when: "peer is defined"
@ -56,14 +56,6 @@
notify: reload interfaces
when: "'bridge' in interfaces | map(attribute='name')"
- name: Set up bonds
template:
dest: "/etc/network/interfaces.d/bond.intf"
src: "bond.intf.j2"
mode: 0644
notify: reload interfaces
when: "'lag' in interfaces | map(attribute='type.value')"
- name: Set nameservers for mgmt VRF
template:
dest: /etc/resolv.conf