Installs initramfs-tools-network-hook (https://github.com/stcz/initramfs-tools-network-hook) to configure "bond" and "vlan" devices in an initramfs boot partition, as well as the server's static IP during initramfs.
-
On the remote:
-
apt
, as this role is usingansible.builtin.apt
-
tar
, to extract downloaded tarball of https://github.com/stcz/initramfs-tools-network-hook -
initramfs
set up, such as by enabling LUKS full-disk encryption when installing the OS. -
Requirements from https://github.com/stcz/initramfs-tools-network-hook:
-
Package
iproute2
for bond support (installed ifinitramfs_network_install_iproute2
is set totrue
) -
Package
vlan
for vlan support (installed ifinitramfs_network_install_vlan
is set totrue
)
-
-
- hosts: servers
become: true
roles:
- { role: initramfs_network, tags: initramfs_network }
-
When using bonding, especially the 802.3ad mode (default), only bonding a single interface will sometimes cause issues.
If you insist on using bonding on a single interface then you can try overriding
initramfs_network_bond_driver_options
to set the bonding mode to e.g balance-rr, which has previously proven successful in this scenario:initramfs_network_bond_driver_options: "mode=balance-rr miimon=100"