ansible/roles/common/templates/ethernet_service.j2

23 lines
687 B
Plaintext
Raw Normal View History

2023-09-25 08:40:20 +00:00
{# 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