diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-05-26 23:50:38 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-05-26 23:50:38 +0200 |
commit | acc437083cfa7b8f77b8e79af2a0c05bd871e198 (patch) | |
tree | 576360023addac147bef43f1ba340c61e3c9fe5b /roles/base | |
parent | remove nextcloud test instance (diff) | |
parent | cleanup old configs and playbooks (diff) |
Merge branch 'topic/zfs-buster-backports'
Diffstat (limited to 'roles/base')
-rw-r--r-- | roles/base/tasks/Debian.yml | 13 | ||||
-rw-r--r-- | roles/base/tasks/intel-nic.yml | 23 |
2 files changed, 25 insertions, 11 deletions
diff --git a/roles/base/tasks/Debian.yml b/roles/base/tasks/Debian.yml index 185c3616..13c3c9f9 100644 --- a/roles/base/tasks/Debian.yml +++ b/roles/base/tasks/Debian.yml @@ -111,15 +111,6 @@ when: install is defined and install.kernel_cmdline is defined notify: update grub -- name: disable TSO (intel nic stability fix) +- name: apply stability fix/workaround for machines using intel NIC when: base_intel_nic_stability_fix - copy: - content: | - [Match] - MACAddress={{ ansible_default_ipv4.macaddress }} - - [Link] - TCPSegmentationOffload=false - GenericSegmentationOffload=false - GenericReceiveOffload=false - dest: /etc/systemd/network/00-disable-offloading.link + import_tasks: intel-nic.yml diff --git a/roles/base/tasks/intel-nic.yml b/roles/base/tasks/intel-nic.yml new file mode 100644 index 00000000..2b9be474 --- /dev/null +++ b/roles/base/tasks/intel-nic.yml @@ -0,0 +1,23 @@ +--- +- name: fetch default link options for network interfaces + slurp: + src: /usr/lib/systemd/network/99-default.link + register: base_systemd_default_link_unit + +- name: disable TSO (intel nic stability fix) + vars: + default_link_options: "{{ (base_systemd_default_link_unit.content | b64decode | from_ini)['Link'] }}" + copy: + content: | + [Match] + MACAddress={{ ansible_default_ipv4.macaddress }} + + [Link] + {% for name, value in default_link_options.items() | sort(attribute='0') %} + {{ name }}={{ value }} + {% endfor %} + + TCPSegmentationOffload=false + GenericSegmentationOffload=false + GenericReceiveOffload=false + dest: /etc/systemd/network/00-disable-offloading.link |