dresden-weekly / ansible-network-interfaces

Ansible roles to manage Ubuntu network interface configuration
MIT License
86 stars 62 forks source link

MTU not being set #48

Open BlakeTacklind opened 7 years ago

BlakeTacklind commented 7 years ago

I have been having this issue that the mtu does not get set in my network definitions during my ansible build.

In my playbook the necessary lines are here:

    - role: dresden-weekly.network-interfaces
      network_manage_devices: yes
      when: result.stdout == "2"  ## see pre_tasks

      network_interfaces:
      - device: eth1
        description: Device Listener  
        auto: true
        allow: 
          - hotplug
        family: inet
        method: static
        address: 169.254.2.2
        network: 169.254.0.0
        netmask: 255.255.0.0
        mtu: 9000

However what appears in /etc/network/interfaces.d/device-eth1 is

# Ansible managed

auto eth1
allow-hotplug

iface eth1 inet static
  description Device Listener
  address 169.254.2.2
  netmask 255.255.0.0
  network 169.254.0.0

Nothing else effects that network interface in my build.

Any ideas on why the mtu is not getting set? I have been forced to add it manually on each device which is very annoying so I hope someone has a fix for this.

arBmind commented 7 years ago

The MTU feature is not part of any release yet. Just use the Github version if you need it now.

I will try to make an updated release soon.