ansible/roles/common/templates/ethernet_service.j2
2023-09-25 10:40:20 +02:00

23 lines
687 B
Django/Jinja

{# Updated: 2023-09-25 #}
# master: {{ common_mastering }}
# updated: {{ ansible_date_time.date }}
[Unit]
Description=Ethernet MTU & Tx Queue Len
After=network-online.target
[Service]
Type=oneshot
{% if jumbo_frames is defined %}
#ExecStart=ip link set {{ ethernet_interface }} mtu 1500
#ExecStart=ip link set {{ ethernet_interface }} txqueuelen 1000
ExecStart=ip link set {{ ethernet_interface }} mtu {{ ethernet_mtu }}
ExecStart=ip link set {{ ethernet_interface }} txqueuelen {{ ethernet_txqueuelen }}
{% else %}
ExecStart=ip link set {{ ethernet_interface }} mtu 1500
ExecStart=ip link set {{ ethernet_interface }} txqueuelen 1000
{% endif %}
[Install]
WantedBy=multi-user.target