Skip to content

Commit 83c519f

Browse files
committed
[libvirt_manager] Honor network mtu in dnsmasq config
When creating a Libvirt network even with custom mtu, dnsmasq was providing default mtu(1500) to the VMs. This patch fixes it by configuring option:mtu as per the network facts. Signed-off-by: Yatin Karel <[email protected]>
1 parent 07f6a4f commit 83c519f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

roles/libvirt_manager/tasks/create_networks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@
156156
{% if _no_prefix_name not in _default_gw_net -%}
157157
- "option:router"
158158
{% endif -%}
159+
{% if ansible_facts[_name].mtu is defined -%}
160+
- "option:mtu,{{ ansible_facts[_name].mtu }}"
161+
{% endif -%}
159162
_dns_listener:
160163
- "{{ ansible_facts[_name].ipv4.address | default('') }}"
161164
- "{{ _ipv6.address | default('') }}"

0 commit comments

Comments
 (0)