fortinet.fortios.fortios_switch_controller_managed_switch – Configure FortiSwitch devices that are managed by this FortiGate in Fortinet’s FortiOS and FortiGate.¶
Note
This plugin is part of the fortinet.fortios collection (version 1.1.9).
To install it use: ansible-galaxy collection install fortinet.fortios
.
To use it in a playbook, specify: fortinet.fortios.fortios_switch_controller_managed_switch
.
New in version 2.8: of fortinet.fortios
Synopsis¶
This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify switch_controller feature and managed_switch category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0
Requirements¶
The below requirements are needed on the host that executes this module.
ansible>=2.9.0
Parameters¶
Examples¶
- hosts: fortigates
collections:
- fortinet.fortios
connection: httpapi
vars:
vdom: "root"
ansible_httpapi_use_ssl: yes
ansible_httpapi_validate_certs: no
ansible_httpapi_port: 443
tasks:
- name: Configure FortiSwitch devices that are managed by this FortiGate.
fortios_switch_controller_managed_switch:
vdom: "{{ vdom }}"
state: "present"
access_token: "<your_own_value>"
switch_controller_managed_switch:
settings_802_1X:
link_down_auth: "set-unauth"
local_override: "enable"
max_reauth_attempt: "6"
reauth_period: "7"
connected: "8"
custom_command:
-
command_entry: "<your_own_value>"
command_name: "<your_own_value> (source switch-controller.custom-command.command-name)"
delayed_restart_trigger: "12"
description: "<your_own_value>"
directly_connected: "14"
dynamic_capability: "15"
dynamically_discovered: "16"
fsw_wan1_admin: "discovered"
fsw_wan1_peer: "<your_own_value>"
fsw_wan2_admin: "discovered"
fsw_wan2_peer: "<your_own_value>"
igmp_snooping:
aging_time: "22"
flood_unknown_multicast: "enable"
local_override: "enable"
max_allowed_trunk_members: "25"
mirror:
-
dst: "<your_own_value>"
name: "default_name_28"
src_egress:
-
name: "default_name_30"
src_ingress:
-
name: "default_name_32"
status: "active"
switching_packet: "enable"
name: "default_name_35"
owner_vdom: "<your_own_value>"
poe_pre_standard_detection: "enable"
ports:
-
allowed_vlans:
-
vlan_name: "<your_own_value> (source system.interface.name)"
allowed_vlans_all: "enable"
arp_inspection_trust: "untrusted"
bundle: "enable"
description: "<your_own_value>"
dhcp_snoop_option82_trust: "enable"
dhcp_snooping: "untrusted"
discard_mode: "none"
edge_port: "enable"
export_tags:
-
tag_name: "<your_own_value> (source switch-controller.switch-interface-tag.name)"
export_to: "<your_own_value> (source system.vdom.name)"
export_to_pool: "<your_own_value> (source switch-controller.virtual-port-pool.name)"
export_to_pool_flag: "53"
fgt_peer_device_name: "<your_own_value>"
fgt_peer_port_name: "<your_own_value>"
fiber_port: "56"
flags: "57"
fortilink_port: "58"
igmp_snooping: "enable"
igmps_flood_reports: "enable"
igmps_flood_traffic: "enable"
isl_local_trunk_name: "<your_own_value>"
isl_peer_device_name: "<your_own_value>"
isl_peer_port_name: "<your_own_value>"
lacp_speed: "slow"
learning_limit: "66"
lldp_profile: "<your_own_value> (source switch-controller.lldp-profile.name)"
lldp_status: "disable"
loop_guard: "enabled"
loop_guard_timeout: "70"
max_bundle: "71"
mclag: "enable"
member_withdrawal_behavior: "forward"
members:
-
member_name: "<your_own_value>"
min_bundle: "76"
mode: "static"
poe_capable: "78"
poe_pre_standard_detection: "enable"
poe_status: "enable"
port_name: "<your_own_value>"
port_number: "82"
port_owner: "<your_own_value>"
port_prefix_type: "84"
port_security_policy: "<your_own_value> (source switch-controller.security-policy.802-1X.name switch-controller.security-policy.captive-portal
.name)"
port_selection_criteria: "src-mac"
qos_policy: "<your_own_value> (source switch-controller.qos.qos-policy.name)"
sample_direction: "tx"
sflow_counter_interval: "89"
sflow_sample_rate: "90"
sflow_sampler: "enabled"
speed: "10half"
speed_mask: "93"
stacking_port: "94"
status: "up"
stp_bpdu_guard: "enabled"
stp_bpdu_guard_timeout: "97"
stp_root_guard: "enabled"
stp_state: "enabled"
switch_id: "<your_own_value>"
type: "physical"
untagged_vlans:
-
vlan_name: "<your_own_value> (source system.interface.name)"
virtual_port: "104"
vlan: "<your_own_value> (source system.interface.name)"
pre_provisioned: "106"
staged_image_version: "<your_own_value>"
storm_control:
broadcast: "enable"
local_override: "enable"
rate: "111"
unknown_multicast: "enable"
unknown_unicast: "enable"
stp_settings:
forward_time: "115"
hello_time: "116"
local_override: "enable"
max_age: "118"
max_hops: "119"
name: "default_name_120"
pending_timer: "121"
revision: "122"
status: "enable"
switch_device_tag: "<your_own_value>"
switch_id: "<your_own_value>"
switch_log:
local_override: "enable"
severity: "emergency"
status: "enable"
switch_profile: "<your_own_value> (source switch-controller.switch-profile.name)"
switch_stp_settings:
status: "enable"
type: "virtual"
version: "134"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Link Zheng (@chillancezen)
Jie Xue (@JieX19)
Hongbin Lu (@fgtdev-hblu)
Frank Shen (@frankshen01)
Miguel Angel Munoz (@mamunozgonzalez)
Nicolas Thomas (@thomnico)