I currently have a cloud init file that setsup the DHCP via the following:
- path: /etc/systemd/system/dhclient@.service
content: |
[Unit]
Description=Run dhclient on %i interface
After=network.target
[Service]
Type=oneshot
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
RemainAfterExit=yes
However I want to now add bonding. I see that the following (for static anyway) would allow for CloudInit based bonding. However Im not sure how this will tie into the above.
network:
version: 2
renderer: networkd
bonds:
bond0:
addresses: [10.10.1.1/24]
gateway4: 10.10.1.254
interfaces:
- eth1
- eth2
parameters:
mode: mode: active-backup
ethernets:
eth1:
addresses: []
dhcp4: false
dhcp6: false
eth2:
addresses: []
dhcp4: false
dhcp6: false
For reference my complete CloudInit can be found at https://pastebin.com/X98KiwaU.
Thanks,