fortinet.fortimanager.fmgr_switchcontroller_managedswitch module – Configure FortiSwitch devices that are managed by this FortiGate.

Note

This module is part of the fortinet.fortimanager collection (version 2.8.2).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install fortinet.fortimanager.

To use it in a playbook, specify: fortinet.fortimanager.fmgr_switchcontroller_managedswitch.

New in fortinet.fortimanager 2.0.0

Synopsis

  • This module is able to configure a FortiManager device.

  • Examples include all parameters and values which need to be adjusted to data sources before usage.

Parameters

Parameter

Comments

access_token

string

The token to access FortiManager without using username and password.

adom

string / required

The parameter (adom) in requested url.

bypass_validation

boolean

Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters.

Choices:

  • false ← (default)

  • true

enable_log

boolean

Enable/Disable logging for task.

Choices:

  • false ← (default)

  • true

forticloud_access_token

string

Authenticate Ansible client with forticloud API access token.

proposed_method

string

The overridden method for the underlying Json RPC request.

Choices:

  • "update"

  • "set"

  • "add"

rc_failed

list / elements=integer

The rc codes list with which the conditions to fail will be overriden.

rc_succeeded

list / elements=integer

The rc codes list with which the conditions to succeed will be overriden.

state

string / required

The directive to create, update or delete an object.

Choices:

  • "present"

  • "absent"

switchcontroller_managedswitch

dictionary

The top level parameters set.

802_1X_settings

aliases: 802-1X-settings

dictionary

802 1X settings.

link_down_auth

aliases: link-down-auth

string

Authentication state to set if a link is down.

Choices:

  • "set-unauth"

  • "no-action"

local_override

aliases: local-override

string

Enable to override global 802.

Choices:

  • "disable"

  • "enable"

mab_reauth

aliases: mab-reauth

string

Enable or disable MAB reauthentication settings.

Choices:

  • "disable"

  • "enable"

mac_called_station_delimiter

aliases: mac-called-station-delimiter

string

MAC called station delimiter

Choices:

  • "hyphen"

  • "single-hyphen"

  • "colon"

  • "none"

mac_calling_station_delimiter

aliases: mac-calling-station-delimiter

string

MAC calling station delimiter

Choices:

  • "hyphen"

  • "single-hyphen"

  • "colon"

  • "none"

mac_case

aliases: mac-case

string

MAC case

Choices:

  • "uppercase"

  • "lowercase"

mac_password_delimiter

aliases: mac-password-delimiter

string

MAC authentication password delimiter

Choices:

  • "hyphen"

  • "single-hyphen"

  • "colon"

  • "none"

mac_username_delimiter

aliases: mac-username-delimiter

string

MAC authentication username delimiter

Choices:

  • "hyphen"

  • "single-hyphen"

  • "colon"

  • "none"

max_reauth_attempt

aliases: max-reauth-attempt

integer

Maximum number of authentication attempts

reauth_period

aliases: reauth-period

integer

Reauthentication time interval

tx_period

aliases: tx-period

integer

_platform

string

Platform.

access_profile

aliases: access-profile

any

(list) FortiSwitch access profile.

custom_command

aliases: custom-command

list / elements=dictionary

Custom command.

command_entry

aliases: command-entry

string

List of FortiSwitch commands.

command_name

aliases: command-name

string

Names of commands to be pushed to this FortiSwitch device, as configured under config switch-controller custom-com…

delayed_restart_trigger

aliases: delayed-restart-trigger

integer

Delayed restart triggered for this FortiSwitch.

description

string

Description.

dhcp_server_access_list

aliases: dhcp-server-access-list

string

DHCP snooping server access list.

Choices:

  • "disable"

  • "enable"

  • "global"

dhcp_snooping_static_client

aliases: dhcp-snooping-static-client

list / elements=dictionary

Dhcp snooping static client.

ip

string

Client static IP address.

mac

string

Client MAC address.

name

string

Client name.

port

string

Interface name.

vlan

string

VLAN name.

directly_connected

aliases: directly-connected

integer

Directly connected.

dynamic_capability

aliases: dynamic-capability

string

List of features this FortiSwitch supports

dynamically_discovered

aliases: dynamically-discovered

integer

Dynamically discovered.

firmware_provision

aliases: firmware-provision

string

Enable/disable provisioning of firmware to FortiSwitches on join connection.

Choices:

  • "disable"

  • "enable"

firmware_provision_latest

aliases: firmware-provision-latest

string

Enable/disable one-time automatic provisioning of the latest firmware version.

Choices:

  • "disable"

  • "once"

firmware_provision_version

aliases: firmware-provision-version

string

Firmware version to provision to this FortiSwitch on bootup

flow_identity

aliases: flow-identity

string

Flow-tracking netflow ipfix switch identity in hex format

fsw_wan1_admin

aliases: fsw-wan1-admin

string

FortiSwitch WAN1 admin status; enable to authorize the FortiSwitch as a managed switch.

Choices:

  • "disable"

  • "enable"

  • "discovered"

fsw_wan1_peer

aliases: fsw-wan1-peer

any

(list) FortiSwitch WAN1 peer port.

fsw_wan2_admin

aliases: fsw-wan2-admin

string

FortiSwitch WAN2 admin status; enable to authorize the FortiSwitch as a managed switch.

Choices:

  • "disable"

  • "enable"

  • "discovered"

fsw_wan2_peer

aliases: fsw-wan2-peer

string

FortiSwitch WAN2 peer port.

igmp_snooping

aliases: igmp-snooping

dictionary

Igmp snooping.

aging_time

aliases: aging-time

integer

Maximum time to retain a multicast snooping entry for which no packets have been seen

flood_unknown_multicast

aliases: flood-unknown-multicast

string

Enable/disable unknown multicast flooding.

Choices:

  • "disable"

  • "enable"

local_override

aliases: local-override

string

Enable/disable overriding the global IGMP snooping configuration.

Choices:

  • "disable"

  • "enable"

vlans

list / elements=dictionary

Vlans.

proxy

string

IGMP snooping proxy for the VLAN interface.

Choices:

  • "disable"

  • "enable"

  • "global"

querier

string

Enable/disable IGMP snooping querier for the VLAN interface.

Choices:

  • "disable"

  • "enable"

querier_addr

aliases: querier-addr

string

IGMP snooping querier address.

version

integer

IGMP snooping querying version.

vlan_name

aliases: vlan-name

any

(list) List of FortiSwitch VLANs.

ip_source_guard

aliases: ip-source-guard

list / elements=dictionary

Ip source guard.

binding_entry

aliases: binding-entry

list / elements=dictionary

Binding entry.

entry_name

aliases: entry-name

string

Configure binding pair.

ip

string

Source IP for this rule.

mac

string

MAC address for this rule.

description

string

Description.

port

string

Ingress interface to which source guard is bound.

l3_discovered

aliases: l3-discovered

integer

L3 discovered.

max_allowed_trunk_members

aliases: max-allowed-trunk-members

integer

FortiSwitch maximum allowed trunk members.

mclag_igmp_snooping_aware

aliases: mclag-igmp-snooping-aware

string

Enable/disable MCLAG IGMP-snooping awareness.

Choices:

  • "disable"

  • "enable"

mgmt_mode

aliases: mgmt-mode

integer

FortiLink management mode.

mirror

list / elements=dictionary

Mirror.

dst

string

Destination port.

name

string

Mirror name.

src_egress

aliases: src-egress

any

(list) Source egress interfaces.

src_ingress

aliases: src-ingress

any

(list) Source ingress interfaces.

status

string

Active/inactive mirror configuration.

Choices:

  • "inactive"

  • "active"

switching_packet

aliases: switching-packet

string

Enable/disable switching functionality when mirroring.

Choices:

  • "disable"

  • "enable"

name

string

Managed-switch name.

override_snmp_community

aliases: override-snmp-community

string

Enable/disable overriding the global SNMP communities.

Choices:

  • "disable"

  • "enable"

override_snmp_sysinfo

aliases: override-snmp-sysinfo

string

Enable/disable overriding the global SNMP system information.

Choices:

  • "disable"

  • "enable"

override_snmp_trap_threshold

aliases: override-snmp-trap-threshold

string

Enable/disable overriding the global SNMP trap threshold values.

Choices:

  • "disable"

  • "enable"

override_snmp_user

aliases: override-snmp-user

string

Enable/disable overriding the global SNMP users.

Choices:

  • "disable"

  • "enable"

owner_vdom

aliases: owner-vdom

string

VDOM which owner of port belongs to.

poe_detection_type

aliases: poe-detection-type

integer

Poe detection type.

poe_lldp_detection

aliases: poe-lldp-detection

string

Enable/disable PoE LLDP detection.

Choices:

  • "disable"

  • "enable"

poe_pre_standard_detection

aliases: poe-pre-standard-detection

string

Enable/disable PoE pre-standard detection.

Choices:

  • "disable"

  • "enable"

ports

list / elements=dictionary

Ports.

access_mode

aliases: access-mode

string

Access mode of the port.

Choices:

  • "normal"

  • "nac"

  • "dynamic"

  • "static"

acl_group

aliases: acl-group

any

(list) ACL groups on this port.

aggregator_mode

aliases: aggregator-mode

string

LACP member select mode.

Choices:

  • "bandwidth"

  • "count"

allow_arp_monitor

aliases: allow-arp-monitor

string

Enable/Disable allow ARP monitor.

Choices:

  • "disable"

  • "enable"

allowed_vlans

aliases: allowed-vlans

any

(list or str) Configure switch port tagged vlans

allowed_vlans_all

aliases: allowed-vlans-all

string

Enable/disable all defined vlans on this port.

Choices:

  • "disable"

  • "enable"

arp_inspection_trust

aliases: arp-inspection-trust

string

Trusted or untrusted dynamic ARP inspection.

Choices:

  • "untrusted"

  • "trusted"

authenticated_port

aliases: authenticated-port

integer

Authenticated port.

bundle

string

Enable/disable Link Aggregation Group

Choices:

  • "disable"

  • "enable"

description

string

Description for port.

dhcp_snoop_option82_override

aliases: dhcp-snoop-option82-override

list / elements=dictionary

Dhcp snoop option82 override.

circuit_id

aliases: circuit-id

string

Circuit ID string.

remote_id

aliases: remote-id

string

Remote ID string.

vlan_name

aliases: vlan-name

string

DHCP snooping option 82 VLAN.

dhcp_snoop_option82_trust

aliases: dhcp-snoop-option82-trust

string

Enable/disable allowance of DHCP with option-82 on untrusted interface.

Choices:

  • "disable"

  • "enable"

dhcp_snooping

aliases: dhcp-snooping

string

Trusted or untrusted DHCP-snooping interface.

Choices:

  • "trusted"

  • "untrusted"

discard_mode

aliases: discard-mode

string

Configure discard mode for port.

Choices:

  • "none"

  • "all-untagged"

  • "all-tagged"

dot1x_enable

aliases: dot1x-enable

string

Dot1x enable.

Choices:

  • "disable"

  • "enable"

dsl_profile

aliases: dsl-profile

string

DSL policy configuration.

edge_port

aliases: edge-port

string

Enable/disable this interface as an edge port, bridging connections between workstations and/or computers.

Choices:

  • "disable"

  • "enable"

encrypted_port

aliases: encrypted-port

integer

Encrypted port.

export_tags

aliases: export-tags

any

(list) Configure export tag

export_to

aliases: export-to

any

(list) Export managed-switch port to a tenant VDOM.

export_to_pool

aliases: export-to-pool

any

(list) Switch controller export port to pool-list.

export_to_pool_flag

aliases: export-to-pool-flag

integer

Switch controller export port to pool-list.

fallback_port

aliases: fallback-port

string

LACP fallback port.

fec_capable

aliases: fec-capable

integer

FEC capable.

fec_state

aliases: fec-state

string

State of forward error correction.

Choices:

  • "disabled"

  • "cl74"

  • "cl91"

  • "detect-by-module"

fgt_peer_device_name

aliases: fgt-peer-device-name

string

Fgt peer device name.

fgt_peer_port_name

aliases: fgt-peer-port-name

string

Fgt peer port name.

fiber_port

aliases: fiber-port

integer

Fiber port.

flags

integer

Flags.

flap_duration

aliases: flap-duration

integer

Period over which flap events are calculated

flap_rate

aliases: flap-rate

integer

Number of stage change events needed within flap-duration.

flap_timeout

aliases: flap-timeout

integer

Flap guard disabling protection

flapguard

string

Enable/disable flap guard.

Choices:

  • "disable"

  • "enable"

flow_control

aliases: flow-control

string

Flow control direction.

Choices:

  • "disable"

  • "tx"

  • "rx"

  • "both"

fortilink_port

aliases: fortilink-port

integer

Fortilink port.

fortiswitch_acls

aliases: fortiswitch-acls

any

(list) ACLs on this port.

igmp_snooping

aliases: igmp-snooping

string

Set IGMP snooping mode for the physical port interface.

Choices:

  • "disable"

  • "enable"

igmp_snooping_flood_reports

aliases: igmp-snooping-flood-reports

string

Enable/disable flooding of IGMP reports to this interface when igmp-snooping enabled.

Choices:

  • "disable"

  • "enable"

igmps_flood_reports

aliases: igmps-flood-reports

string

Enable/disable flooding of IGMP reports to this interface when igmp-snooping enabled.

Choices:

  • "disable"

  • "enable"

igmps_flood_traffic

aliases: igmps-flood-traffic

string

Enable/disable flooding of IGMP snooping traffic to this interface.

Choices:

  • "disable"

  • "enable"

interface_tags

aliases: interface-tags

any

(list or str) Tag

ip_source_guard

aliases: ip-source-guard

string

Enable/disable IP source guard.

Choices:

  • "disable"

  • "enable"

isl_local_trunk_name

aliases: isl-local-trunk-name

string

Isl local trunk name.

isl_peer_device_name

aliases: isl-peer-device-name

string

Isl peer device name.

isl_peer_device_sn

aliases: isl-peer-device-sn

string

Isl peer device sn.

isl_peer_port_name

aliases: isl-peer-port-name

string

Isl peer port name.

lacp_speed

aliases: lacp-speed

string

End Link Aggregation Control Protocol

Choices:

  • "slow"

  • "fast"

learning_limit

aliases: learning-limit

integer

Limit the number of dynamic MAC addresses on this Port

link_status

aliases: link-status

string

Link status.

Choices:

  • "down"

  • "up"

lldp_profile

aliases: lldp-profile

string

LLDP port TLV profile.

lldp_status

aliases: lldp-status

string

LLDP transmit and receive status.

Choices:

  • "disable"

  • "rx-only"

  • "tx-only"

  • "tx-rx"

log_mac_event

aliases: log-mac-event

string

Enable/disable logging for dynamic MAC address events.

Choices:

  • "disable"

  • "enable"

loop_guard

aliases: loop-guard

string

Enable/disable loop-guard on this interface, an STP optimization used to prevent network loops.

Choices:

  • "disabled"

  • "enabled"

loop_guard_timeout

aliases: loop-guard-timeout

integer

Loop-guard timeout

mac_addr

aliases: mac-addr

string

Port/Trunk MAC.

matched_dpp_intf_tags

aliases: matched-dpp-intf-tags

string

Matched interface tags in the dynamic port policy.

matched_dpp_policy

aliases: matched-dpp-policy

string

Matched child policy in the dynamic port policy.

max_bundle

aliases: max-bundle

integer

Maximum size of LAG bundle

max_miss_heartbeats

aliases: max-miss-heartbeats

integer

Maximum tolerant missed heartbeats.

mcast_snooping_flood_traffic

aliases: mcast-snooping-flood-traffic

string

Enable/disable flooding of IGMP snooping traffic to this interface.

Choices:

  • "disable"

  • "enable"

mclag

string

Enable/disable multi-chassis link aggregation

Choices:

  • "disable"

  • "enable"

mclag_icl_port

aliases: mclag-icl-port

integer

Mclag icl port.

media_type

aliases: media-type

string

Media type.

member_withdrawal_behavior

aliases: member-withdrawal-behavior

string

Port behavior after it withdraws because of loss of control packets.

Choices:

  • "forward"

  • "block"

members

any

(list) Aggregated LAG bundle interfaces.

min_bundle

aliases: min-bundle

integer

Minimum size of LAG bundle

mode

string

LACP mode

Choices:

  • "static"

  • "lacp-passive"

  • "lacp-active"

p2p_port

aliases: p2p-port

integer

P2p port.

packet_sample_rate

aliases: packet-sample-rate

integer

Packet sampling rate

packet_sampler

aliases: packet-sampler

string

Enable/disable packet sampling on this interface.

Choices:

  • "disabled"

  • "enabled"

pause_meter

aliases: pause-meter

integer

Configure ingress pause metering rate, in kbps

pause_meter_resume

aliases: pause-meter-resume

string

Resume threshold for resuming traffic on ingress port.

Choices:

  • "25%"

  • "50%"

  • "75%"

pd_capable

aliases: pd-capable

integer

Powered device capable.

poe_capable

aliases: poe-capable

integer

PoE capable.

poe_max_power

aliases: poe-max-power

string

Poe max power.

poe_mode_bt_cabable

aliases: poe-mode-bt-cabable

integer

PoE mode IEEE 802.

poe_port_mode

aliases: poe-port-mode

string

Configure PoE port mode.

Choices:

  • "ieee802-3af"

  • "ieee802-3at"

  • "ieee802-3bt"

poe_port_power

aliases: poe-port-power

string

Configure PoE port power.

Choices:

  • "normal"

  • "perpetual"

  • "perpetual-fast"

poe_port_priority

aliases: poe-port-priority

string

Configure PoE port priority.

Choices:

  • "critical-priority"

  • "high-priority"

  • "low-priority"

  • "medium-priority"

poe_pre_standard_detection

aliases: poe-pre-standard-detection

string

Enable/disable PoE pre-standard detection.

Choices:

  • "disable"

  • "enable"

poe_standard

aliases: poe-standard

string

Poe standard.

poe_status

aliases: poe-status

string

Enable/disable PoE status.

Choices:

  • "disable"

  • "enable"

port_name

aliases: port-name

string

Switch port name.

port_number

aliases: port-number

integer

Port number.

port_owner

aliases: port-owner

string

Switch port name.

port_policy

aliases: port-policy

string

Switch controller dynamic port policy from available options.

port_prefix_type

aliases: port-prefix-type

integer

Port prefix type.

port_security_policy

aliases: port-security-policy

string

Switch controller authentication policy to apply to this managed switch from available options.

port_selection_criteria

aliases: port-selection-criteria

string

Algorithm for aggregate port selection.

Choices:

  • "src-mac"

  • "dst-mac"

  • "src-dst-mac"

  • "src-ip"

  • "dst-ip"

  • "src-dst-ip"

ptp_policy

aliases: ptp-policy

any

(list) PTP policy configuration.

ptp_status

aliases: ptp-status

string

Enable/disable PTP policy on this FortiSwitch port.

Choices:

  • "disable"

  • "enable"

qnq

any

(list) ‘802.’

qos_policy

aliases: qos-policy

string

Switch controller QoS policy from available options.

restricted_auth_port

aliases: restricted-auth-port

integer

Restricted auth port.

rpvst_port

aliases: rpvst-port

string

Enable/disable inter-operability with rapid PVST on this interface.

Choices:

  • "disabled"

  • "enabled"

sample_direction

aliases: sample-direction

string

SFlow sample direction.

Choices:

  • "rx"

  • "tx"

  • "both"

sflow_counter_interval

aliases: sflow-counter-interval

integer

SFlow sampler counter polling interval

sflow_sample_rate

aliases: sflow-sample-rate

integer

SFlow sampler sample rate

sflow_sampler

aliases: sflow-sampler

string

Enable/disable sFlow protocol on this interface.

Choices:

  • "disabled"

  • "enabled"

speed

string

Switch port speed; default and available settings depend on hardware.

Choices:

  • "auto"

  • "10full"

  • "10half"

  • "100full"

  • "100half"

  • "1000full"

  • "10000full"

  • "1000auto"

  • "40000full"

  • "1000fiber"

  • "10000"

  • "40000"

  • "auto-module"

  • "100FX-half"

  • "100FX-full"

  • "100000full"

  • "2500full"

  • "25000full"

  • "50000full"

  • "40000auto"

  • "10000cr"

  • "10000sr"

  • "100000sr4"

  • "100000cr4"

  • "25000cr4"

  • "25000sr4"

  • "5000full"

  • "2500auto"

  • "5000auto"

  • "1000full-fiber"

  • "40000sr4"

  • "40000cr4"

  • "25000cr"

  • "25000sr"

  • "50000cr"

  • "50000sr"

speed_mask

aliases: speed-mask

integer

Switch port speed mask.

stacking_port

aliases: stacking-port

integer

Stacking port.

status

string

Switch port admin status

Choices:

  • "down"

  • "up"

sticky_mac

aliases: sticky-mac

string

Enable or disable sticky-mac on the interface.

Choices:

  • "disable"

  • "enable"

storm_control_policy

aliases: storm-control-policy

string

Switch controller storm control policy from available options.

stp_bpdu_guard

aliases: stp-bpdu-guard

string

Enable/disable STP BPDU guard on this interface.

Choices:

  • "disabled"

  • "enabled"

stp_bpdu_guard_timeout

aliases: stp-bpdu-guard-timeout

integer

BPDU Guard disabling protection

stp_root_guard

aliases: stp-root-guard

string

Enable/disable STP root guard on this interface.

Choices:

  • "disabled"

  • "enabled"

stp_state

aliases: stp-state

string

Enable/disable Spanning Tree Protocol

Choices:

  • "disabled"

  • "enabled"

switch_id

aliases: switch-id

string

Switch id.

trunk_member

aliases: trunk-member

integer

Trunk member.

type

string

Interface type

Choices:

  • "physical"

  • "trunk"

untagged_vlans

aliases: untagged-vlans

any

(list or str) Configure switch port untagged vlans

virtual_port

aliases: virtual-port

integer

Virtualized switch port.

vlan

string

Assign switch ports to a VLAN.

pre_provisioned

aliases: pre-provisioned

integer

Pre-provisioned managed switch.

ptp_profile

aliases: ptp-profile

string

PTP profile configuration.

ptp_status

aliases: ptp-status

string

Enable/disable PTP profile on this FortiSwitch.

Choices:

  • "disable"

  • "enable"

purdue_level

aliases: purdue-level

string

Purdue Level of this FortiSwitch.

Choices:

  • "1"

  • "2"

  • "3"

  • "4"

  • "5"

  • "1.5"

  • "2.5"

  • "3.5"

  • "5.5"

qos_drop_policy

aliases: qos-drop-policy

string

Set QoS drop-policy.

Choices:

  • "taildrop"

  • "random-early-detection"

qos_red_probability

aliases: qos-red-probability

integer

Set QoS RED/WRED drop probability.

radius_nas_ip

aliases: radius-nas-ip

string

NAS-IP address.

radius_nas_ip_override

aliases: radius-nas-ip-override

string

Use locally defined NAS-IP.

Choices:

  • "disable"

  • "enable"

remote_log

aliases: remote-log

list / elements=dictionary

Remote log.

csv

string

Enable/disable comma-separated value

Choices:

  • "disable"

  • "enable"

facility

string

Facility to log to remote syslog server.

Choices:

  • "kernel"

  • "user"

  • "mail"

  • "daemon"

  • "auth"

  • "syslog"

  • "lpr"

  • "news"

  • "uucp"

  • "cron"

  • "authpriv"

  • "ftp"

  • "ntp"

  • "audit"

  • "alert"

  • "clock"

  • "local0"

  • "local1"

  • "local2"

  • "local3"

  • "local4"

  • "local5"

  • "local6"

  • "local7"

name

string

Remote log name.

port

integer

Remote syslog server listening port.

server

string

IPv4 address of the remote syslog server.

severity

string

Severity of logs to be transferred to remote log server.

Choices:

  • "emergency"

  • "alert"

  • "critical"

  • "error"

  • "warning"

  • "notification"

  • "information"

  • "debug"

status

string

Enable/disable logging by FortiSwitch device to a remote syslog server.

Choices:

  • "disable"

  • "enable"

route_offload

aliases: route-offload

string

Enable/disable route offload on this FortiSwitch.

Choices:

  • "disable"

  • "enable"

route_offload_mclag

aliases: route-offload-mclag

string

Enable/disable route offload MCLAG on this FortiSwitch.

Choices:

  • "disable"

  • "enable"

route_offload_router

aliases: route-offload-router

list / elements=dictionary

Route offload router.

router_ip

aliases: router-ip

string

Router IP address.

vlan_name

aliases: vlan-name

string

VLAN name.

sn

string

Managed-switch serial number.

snmp_community

aliases: snmp-community

list / elements=dictionary

Snmp community.

events

list / elements=string

SNMP notifications

Choices:

  • "cpu-high"

  • "mem-low"

  • "log-full"

  • "intf-ip"

  • "ent-conf-change"

  • "l2mac"

hosts

list / elements=dictionary

Hosts.

id

integer

Host entry ID.

ip

string

IPv4 address of the SNMP manager

id

integer

SNMP community ID.

name

string

SNMP community name.

query_v1_port

aliases: query-v1-port

integer

SNMP v1 query port

query_v1_status

aliases: query-v1-status

string

Enable/disable SNMP v1 queries.

Choices:

  • "disable"

  • "enable"

query_v2c_port

aliases: query-v2c-port

integer

SNMP v2c query port

query_v2c_status

aliases: query-v2c-status

string

Enable/disable SNMP v2c queries.

Choices:

  • "disable"

  • "enable"

status

string

Enable/disable this SNMP community.

Choices:

  • "disable"

  • "enable"

trap_v1_lport

aliases: trap-v1-lport

integer

SNMP v2c trap local port

trap_v1_rport

aliases: trap-v1-rport

integer

SNMP v2c trap remote port

trap_v1_status

aliases: trap-v1-status

string

Enable/disable SNMP v1 traps.

Choices:

  • "disable"

  • "enable"

trap_v2c_lport

aliases: trap-v2c-lport

integer

SNMP v2c trap local port

trap_v2c_rport

aliases: trap-v2c-rport

integer

SNMP v2c trap remote port

trap_v2c_status

aliases: trap-v2c-status

string

Enable/disable SNMP v2c traps.

Choices:

  • "disable"

  • "enable"

snmp_sysinfo

aliases: snmp-sysinfo

dictionary

Snmp sysinfo.

contact_info

aliases: contact-info

string

Contact information.

description

string

System description.

engine_id

aliases: engine-id

string

Local SNMP engine ID string

location

string

System location.

status

string

Enable/disable SNMP.

Choices:

  • "disable"

  • "enable"

snmp_trap_threshold

aliases: snmp-trap-threshold

dictionary

Snmp trap threshold.

trap_high_cpu_threshold

aliases: trap-high-cpu-threshold

integer

CPU usage when trap is sent.

trap_log_full_threshold

aliases: trap-log-full-threshold

integer

Log disk usage when trap is sent.

trap_low_memory_threshold

aliases: trap-low-memory-threshold

integer

Memory usage when trap is sent.

snmp_user

aliases: snmp-user

list / elements=dictionary

Snmp user.

auth_proto

aliases: auth-proto

string

Authentication protocol.

Choices:

  • "md5"

  • "sha"

  • "sha1"

  • "sha256"

  • "sha384"

  • "sha512"

  • "sha224"

auth_pwd

aliases: auth-pwd

any

(list) Password for authentication protocol.

name

string

SNMP user name.

priv_proto

aliases: priv-proto

string

Privacy

Choices:

  • "des"

  • "aes"

  • "aes128"

  • "aes192"

  • "aes256"

  • "aes192c"

  • "aes256c"

priv_pwd

aliases: priv-pwd

any

(list) Password for privacy

queries

string

Enable/disable SNMP queries for this user.

Choices:

  • "disable"

  • "enable"

query_port

aliases: query-port

integer

SNMPv3 query port

security_level

aliases: security-level

string

Security level for message authentication and encryption.

Choices:

  • "no-auth-no-priv"

  • "auth-no-priv"

  • "auth-priv"

staged_image_version

aliases: staged-image-version

string

Staged image version for FortiSwitch.

static_mac

aliases: static-mac

list / elements=dictionary

Static mac.

description

string

Description.

id

integer

ID.

interface

string

Interface name.

mac

string

MAC address.

type

string

Type.

Choices:

  • "static"

  • "sticky"

vlan

any

(list) Vlan.

storm_control

aliases: storm-control

dictionary

Storm control.

broadcast

string

Enable/disable storm control to drop broadcast traffic.

Choices:

  • "disable"

  • "enable"

local_override

aliases: local-override

string

Enable to override global FortiSwitch storm control settings for this FortiSwitch.

Choices:

  • "disable"

  • "enable"

rate

integer

Rate in packets per second at which storm control drops excess traffic

unknown_multicast

aliases: unknown-multicast

string

Enable/disable storm control to drop unknown multicast traffic.

Choices:

  • "disable"

  • "enable"

unknown_unicast

aliases: unknown-unicast

string

Enable/disable storm control to drop unknown unicast traffic.

Choices:

  • "disable"

  • "enable"

stp_instance

aliases: stp-instance

list / elements=dictionary

Stp instance.

id

string

Instance ID.

priority

string

Priority.

Choices:

  • "0"

  • "4096"

  • "8192"

  • "12288"

  • "12328"

  • "16384"

  • "20480"

  • "24576"

  • "28672"

  • "32768"

  • "36864"

  • "40960"

  • "45056"

  • "49152"

  • "53248"

  • "57344"

  • "61440"

stp_settings

aliases: stp-settings

dictionary

Stp settings.

forward_time

aliases: forward-time

integer

Period of time a port is in listening and learning state

hello_time

aliases: hello-time

integer

Period of time between successive STP frame Bridge Protocol Data Units

local_override

aliases: local-override

string

Enable to configure local STP settings that override global STP settings.

Choices:

  • "disable"

  • "enable"

max_age

aliases: max-age

integer

Maximum time before a bridge port saves its configuration BPDU information

max_hops

aliases: max-hops

integer

Maximum number of hops between the root bridge and the furthest bridge

name

string

Name of local STP settings configuration.

pending_timer

aliases: pending-timer

integer

Pending time

revision

integer

STP revision number

status

string

Enable/disable STP.

Choices:

  • "disable"

  • "enable"

switch_device_tag

aliases: switch-device-tag

string

User definable label/tag.

switch_dhcp_opt43_key

aliases: switch-dhcp_opt43_key

string

DHCP option43 key.

switch_id

aliases: switch-id

string / required

Managed-switch id.

switch_log

aliases: switch-log

dictionary

Switch log.

local_override

aliases: local-override

string

Enable to configure local logging settings that override global logging settings.

Choices:

  • "disable"

  • "enable"

severity

string

Severity of FortiSwitch logs that are added to the FortiGate event log.

Choices:

  • "emergency"

  • "alert"

  • "critical"

  • "error"

  • "warning"

  • "notification"

  • "information"

  • "debug"

status

string

Enable/disable adding FortiSwitch logs to the FortiGate event log.

Choices:

  • "disable"

  • "enable"

switch_profile

aliases: switch-profile

any

(list) FortiSwitch profile.

tdr_supported

aliases: tdr-supported

string

Tdr supported.

tunnel_discovered

aliases: tunnel-discovered

integer

Tunnel discovered.

type

string

Indication of switch type, physical or virtual.

Choices:

  • "physical"

  • "virtual"

version

integer

FortiSwitch version.

vlan

list / elements=dictionary

Vlan.

assignment_priority

aliases: assignment-priority

integer

vlan_name

aliases: vlan-name

string

VLAN name.

workspace_locking_adom

string

The adom to lock for FortiManager running in workspace mode, the value can be global and others including root.

workspace_locking_timeout

integer

The maximum time in seconds to wait for other user to release the workspace lock.

Default: 300

Notes

Note

  • Starting in version 2.4.0, all input arguments are named using the underscore naming convention (snake_case). Please change the arguments such as “var-name” to “var_name”. Old argument names are still available yet you will receive deprecation warnings. You can ignore this warning by setting deprecation_warnings=False in ansible.cfg.

  • Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work.

  • To create or update an object, use state present directive.

  • To delete an object, use state absent directive.

  • Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded

Examples

- name: Example playbook (generated based on argument schema)
  hosts: fortimanagers
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Configure FortiSwitch devices that are managed by this FortiGate.
      fortinet.fortimanager.fmgr_switchcontroller_managedswitch:
        # bypass_validation: false
        workspace_locking_adom: <value in [global, custom adom including root]>
        workspace_locking_timeout: 300
        # rc_succeeded: [0, -2, -3, ...]
        # rc_failed: [-2, -3, ...]
        adom: <your own value>
        state: present # <value in [present, absent]>
        switchcontroller_managedswitch:
          _platform: <string>
          description: <string>
          name: <string>
          ports:
            -
              allowed_vlans: <list or string>
              allowed_vlans_all: <value in [disable, enable]>
              arp_inspection_trust: <value in [untrusted, trusted]>
              bundle: <value in [disable, enable]>
              description: <string>
              dhcp_snoop_option82_trust: <value in [disable, enable]>
              dhcp_snooping: <value in [trusted, untrusted]>
              discard_mode: <value in [none, all-untagged, all-tagged]>
              edge_port: <value in [disable, enable]>
              igmp_snooping: <value in [disable, enable]>
              igmps_flood_reports: <value in [disable, enable]>
              igmps_flood_traffic: <value in [disable, enable]>
              lacp_speed: <value in [slow, fast]>
              learning_limit: <integer>
              lldp_profile: <string>
              lldp_status: <value in [disable, rx-only, tx-only, ...]>
              loop_guard: <value in [disabled, enabled]>
              loop_guard_timeout: <integer>
              max_bundle: <integer>
              mclag: <value in [disable, enable]>
              member_withdrawal_behavior: <value in [forward, block]>
              members: <list or string>
              min_bundle: <integer>
              mode: <value in [static, lacp-passive, lacp-active]>
              poe_pre_standard_detection: <value in [disable, enable]>
              poe_status: <value in [disable, enable]>
              port_name: <string>
              port_owner: <string>
              port_security_policy: <string>
              port_selection_criteria: <value in [src-mac, dst-mac, src-dst-mac, ...]>
              qos_policy: <string>
              sample_direction: <value in [rx, tx, both]>
              sflow_counter_interval: <integer>
              sflow_sample_rate: <integer>
              sflow_sampler: <value in [disabled, enabled]>
              stp_bpdu_guard: <value in [disabled, enabled]>
              stp_bpdu_guard_timeout: <integer>
              stp_root_guard: <value in [disabled, enabled]>
              stp_state: <value in [disabled, enabled]>
              type: <value in [physical, trunk]>
              untagged_vlans: <list or string>
              vlan: <string>
              export_to_pool_flag: <integer>
              mac_addr: <string>
              packet_sample_rate: <integer>
              packet_sampler: <value in [disabled, enabled]>
              sticky_mac: <value in [disable, enable]>
              storm_control_policy: <string>
              dot1x_enable: <value in [disable, enable]>
              max_miss_heartbeats: <integer>
              access_mode: <value in [normal, nac, dynamic, ...]>
              ip_source_guard: <value in [disable, enable]>
              mclag_icl_port: <integer>
              p2p_port: <integer>
              aggregator_mode: <value in [bandwidth, count]>
              rpvst_port: <value in [disabled, enabled]>
              flow_control: <value in [disable, tx, rx, ...]>
              media_type: <string>
              pause_meter: <integer>
              pause_meter_resume: <value in [25%, 50%, 75%]>
              trunk_member: <integer>
              fec_capable: <integer>
              fec_state: <value in [disabled, cl74, cl91, ...]>
              matched_dpp_intf_tags: <string>
              matched_dpp_policy: <string>
              port_policy: <string>
              status: <value in [down, up]>
              dsl_profile: <string>
              flap_duration: <integer>
              flap_rate: <integer>
              flap_timeout: <integer>
              flapguard: <value in [disable, enable]>
              interface_tags: <list or string>
              poe_max_power: <string>
              poe_standard: <string>
              igmp_snooping_flood_reports: <value in [disable, enable]>
              mcast_snooping_flood_traffic: <value in [disable, enable]>
              link_status: <value in [down, up]>
              poe_mode_bt_cabable: <integer>
              poe_port_mode: <value in [ieee802-3af, ieee802-3at, ieee802-3bt]>
              poe_port_power: <value in [normal, perpetual, perpetual-fast]>
              poe_port_priority: <value in [critical-priority, high-priority, low-priority, ...]>
              acl_group: <list or string>
              dhcp_snoop_option82_override:
                -
                  circuit_id: <string>
                  remote_id: <string>
                  vlan_name: <string>
              fortiswitch_acls: <list or integer>
              isl_peer_device_sn: <string>
              authenticated_port: <integer>
              encrypted_port: <integer>
              ptp_status: <value in [disable, enable]>
              restricted_auth_port: <integer>
              allow_arp_monitor: <value in [disable, enable]>
              export_to: <list or string>
              export_to_pool: <list or string>
              fallback_port: <string>
              fgt_peer_device_name: <string>
              fgt_peer_port_name: <string>
              fiber_port: <integer>
              flags: <integer>
              fortilink_port: <integer>
              isl_local_trunk_name: <string>
              isl_peer_device_name: <string>
              isl_peer_port_name: <string>
              poe_capable: <integer>
              port_number: <integer>
              port_prefix_type: <integer>
              ptp_policy: <list or string>
              speed: <value in [auto, 10full, 10half, ...]>
              speed_mask: <integer>
              stacking_port: <integer>
              switch_id: <string>
              virtual_port: <integer>
              export_tags: <list or string>
              log_mac_event: <value in [disable, enable]>
              pd_capable: <integer>
              qnq: <list or string>
          switch_id: <string>
          override_snmp_community: <value in [disable, enable]>
          override_snmp_sysinfo: <value in [disable, enable]>
          override_snmp_trap_threshold: <value in [disable, enable]>
          override_snmp_user: <value in [disable, enable]>
          poe_detection_type: <integer>
          remote_log:
            -
              csv: <value in [disable, enable]>
              facility: <value in [kernel, user, mail, ...]>
              name: <string>
              port: <integer>
              server: <string>
              severity: <value in [emergency, alert, critical, ...]>
              status: <value in [disable, enable]>
          snmp_community:
            -
              events:
                - "cpu-high"
                - "mem-low"
                - "log-full"
                - "intf-ip"
                - "ent-conf-change"
                - "l2mac"
              hosts:
                -
                  id: <integer>
                  ip: <string>
              id: <integer>
              name: <string>
              query_v1_port: <integer>
              query_v1_status: <value in [disable, enable]>
              query_v2c_port: <integer>
              query_v2c_status: <value in [disable, enable]>
              status: <value in [disable, enable]>
              trap_v1_lport: <integer>
              trap_v1_rport: <integer>
              trap_v1_status: <value in [disable, enable]>
              trap_v2c_lport: <integer>
              trap_v2c_rport: <integer>
              trap_v2c_status: <value in [disable, enable]>
          snmp_user:
            -
              auth_proto: <value in [md5, sha, sha1, ...]>
              auth_pwd: <list or string>
              name: <string>
              priv_proto: <value in [des, aes, aes128, ...]>
              priv_pwd: <list or string>
              queries: <value in [disable, enable]>
              query_port: <integer>
              security_level: <value in [no-auth-no-priv, auth-no-priv, auth-priv]>
          mclag_igmp_snooping_aware: <value in [disable, enable]>
          ip_source_guard:
            -
              binding_entry:
                -
                  entry_name: <string>
                  ip: <string>
                  mac: <string>
              description: <string>
              port: <string>
          l3_discovered: <integer>
          qos_drop_policy: <value in [taildrop, random-early-detection]>
          qos_red_probability: <integer>
          switch_dhcp_opt43_key: <string>
          tdr_supported: <string>
          custom_command:
            -
              command_entry: <string>
              command_name: <string>
          firmware_provision: <value in [disable, enable]>
          firmware_provision_version: <string>
          dhcp_server_access_list: <value in [disable, enable, global]>
          firmware_provision_latest: <value in [disable, once]>
          dhcp_snooping_static_client:
            -
              ip: <string>
              mac: <string>
              name: <string>
              port: <string>
              vlan: <string>
          ptp_profile: <string>
          ptp_status: <value in [disable, enable]>
          route_offload: <value in [disable, enable]>
          route_offload_mclag: <value in [disable, enable]>
          route_offload_router:
            -
              router_ip: <string>
              vlan_name: <string>
          mgmt_mode: <integer>
          purdue_level: <value in [1, 2, 3, ...]>
          radius_nas_ip: <string>
          radius_nas_ip_override: <value in [disable, enable]>
          tunnel_discovered: <integer>
          vlan:
            -
              assignment_priority: <integer>
              vlan_name: <string>
          802_1X_settings:
            link_down_auth: <value in [set-unauth, no-action]>
            local_override: <value in [disable, enable]>
            mab_reauth: <value in [disable, enable]>
            mac_called_station_delimiter: <value in [hyphen, single-hyphen, colon, ...]>
            mac_calling_station_delimiter: <value in [hyphen, single-hyphen, colon, ...]>
            mac_case: <value in [uppercase, lowercase]>
            mac_password_delimiter: <value in [hyphen, single-hyphen, colon, ...]>
            mac_username_delimiter: <value in [hyphen, single-hyphen, colon, ...]>
            max_reauth_attempt: <integer>
            reauth_period: <integer>
            tx_period: <integer>
          access_profile: <list or string>
          delayed_restart_trigger: <integer>
          directly_connected: <integer>
          dynamic_capability: <string>
          dynamically_discovered: <integer>
          flow_identity: <string>
          fsw_wan1_admin: <value in [disable, enable, discovered]>
          fsw_wan1_peer: <list or string>
          fsw_wan2_admin: <value in [disable, enable, discovered]>
          fsw_wan2_peer: <string>
          igmp_snooping:
            aging_time: <integer>
            flood_unknown_multicast: <value in [disable, enable]>
            local_override: <value in [disable, enable]>
            vlans:
              -
                proxy: <value in [disable, enable, global]>
                querier: <value in [disable, enable]>
                querier_addr: <string>
                version: <integer>
                vlan_name: <list or string>
          max_allowed_trunk_members: <integer>
          mirror:
            -
              dst: <string>
              name: <string>
              src_egress: <list or string>
              src_ingress: <list or string>
              status: <value in [inactive, active]>
              switching_packet: <value in [disable, enable]>
          owner_vdom: <string>
          poe_pre_standard_detection: <value in [disable, enable]>
          pre_provisioned: <integer>
          sn: <string>
          snmp_sysinfo:
            contact_info: <string>
            description: <string>
            engine_id: <string>
            location: <string>
            status: <value in [disable, enable]>
          snmp_trap_threshold:
            trap_high_cpu_threshold: <integer>
            trap_log_full_threshold: <integer>
            trap_low_memory_threshold: <integer>
          staged_image_version: <string>
          static_mac:
            -
              description: <string>
              id: <integer>
              interface: <string>
              mac: <string>
              type: <value in [static, sticky]>
              vlan: <list or string>
          storm_control:
            broadcast: <value in [disable, enable]>
            local_override: <value in [disable, enable]>
            rate: <integer>
            unknown_multicast: <value in [disable, enable]>
            unknown_unicast: <value in [disable, enable]>
          stp_instance:
            -
              id: <string>
              priority: <value in [0, 4096, 8192, ...]>
          stp_settings:
            forward_time: <integer>
            hello_time: <integer>
            local_override: <value in [disable, enable]>
            max_age: <integer>
            max_hops: <integer>
            name: <string>
            pending_timer: <integer>
            revision: <integer>
            status: <value in [disable, enable]>
          switch_device_tag: <string>
          switch_log:
            local_override: <value in [disable, enable]>
            severity: <value in [emergency, alert, critical, ...]>
            status: <value in [disable, enable]>
          switch_profile: <list or string>
          type: <value in [physical, virtual]>
          version: <integer>
          poe_lldp_detection: <value in [disable, enable]>

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

meta

dictionary

The result of the request.

Returned: always

request_url

string

The full url requested.

Returned: always

Sample: "/sys/login/user"

response_code

integer

The status of api request.

Returned: always

Sample: 0

response_data

list / elements=string

The api response.

Returned: always

response_message

string

The descriptive message of the api response.

Returned: always

Sample: "OK."

system_information

dictionary

The information of the target system.

Returned: always

rc

integer

The status the request.

Returned: always

Sample: 0

version_check_warning

list / elements=string

Warning if the parameters used in the playbook are not supported by the current FortiManager version.

Returned: complex

Authors

  • Xinwei Du (@dux-fortinet)

  • Xing Li (@lix-fortinet)

  • Jie Xue (@JieX19)

  • Link Zheng (@chillancezen)

  • Frank Shen (@fshen01)

  • Hongbin Lu (@fgtdev-hblu)