Hello,
I have a 40F.
Default config has a virtual hardware switch called "lan" whose member interfaces are: "lan1", "lan2" and "lan3".
I would like to remove those member interfaces from the "lan" switch using Ansible.
Do you know how to do that ?
I tried the tasks bellow, leaving the port empty, but no success.
If I specify just one port, like lan1, it removes the others. I need to remove them all.
task1
- name: Remove member interfaces from "lan" virtual hardware switch
fortinet.fortios.fortios_system_virtual_switch:
vdom: "{{ vdom }}"
state: "present"
system_virtual_switch:
name: "lan"
port:
task2
- name: Remove member interfaces from "lan" virtual hardware switch
fortinet.fortios.fortios_system_virtual_switch:
vdom: "{{ vdom }}"
state: "present"
system_virtual_switch:
name: "lan"
port:
-
Solved! Go to Solution.
It is not possible to have a virtual hardware switch without at least one member interface.
Tried it on the GUI, so I believe the same applies to Ansible or CLI.
Since you want to remove all of the entries, have you tried by adding a wildard in the port parameter?
Example:
port: "lan*"
It is not possible to have a virtual hardware switch without at least one member interface.
Tried it on the GUI, so I believe the same applies to Ansible or CLI.
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1748 | |
1114 | |
765 | |
447 | |
241 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.