From 63155983fe7ec0aed48382352086ee027a6f6090 Mon Sep 17 00:00:00 2001 From: "Sean M. Collins" Date: Wed, 15 May 2019 10:27:46 -0400 Subject: [PATCH] [eos] Allow ports to be configured with just trunk mode (#55887) Fixes #55886 --- lib/ansible/modules/network/eos/eos_l2_interface.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/modules/network/eos/eos_l2_interface.py b/lib/ansible/modules/network/eos/eos_l2_interface.py index 563a6adc2a..bd2dad8773 100644 --- a/lib/ansible/modules/network/eos/eos_l2_interface.py +++ b/lib/ansible/modules/network/eos/eos_l2_interface.py @@ -189,6 +189,7 @@ def map_obj_to_commands(updates, module): if access_vlan != obj_in_have['access_vlan']: commands.append('switchport access vlan {0}'.format(access_vlan)) else: + commands.append('switchport mode {0}'.format(mode)) if native_vlan != obj_in_have['native_vlan'] and native_vlan: commands.append('switchport trunk native vlan {0}'.format(native_vlan)) if trunk_allowed_vlans != obj_in_have['trunk_allowed_vlans'] and trunk_allowed_vlans: