fortinet.fortimanager.fmgr_switchcontroller_managedswitch 模块 – 配置由此 FortiGate 管理的 FortiSwitch 设备。

注意

此模块是 fortinet.fortimanager 集合(版本 2.8.2)的一部分。

如果您使用的是 ansible 包,则可能已安装此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install fortinet.fortimanager

要在剧本中使用它,请指定:fortinet.fortimanager.fmgr_switchcontroller_managedswitch

fortinet.fortimanager 2.0.0 中的新增功能

概要

  • 此模块能够配置 FortiManager 设备。

  • 示例包括所有参数和值,这些参数和值在使用前需要调整为数据源。

参数

参数

注释

access_token

字符串

无需使用用户名和密码即可访问 FortiManager 的令牌。

adom

字符串 / 必需

请求 URL 中的参数 (adom)。

bypass_validation

布尔值

仅当模块架构与 FortiManager API 结构不同时才设置为 True,模块将继续执行而不验证参数。

选项

  • false ← (默认)

  • true

enable_log

布尔值

启用/禁用任务日志记录。

选项

  • false ← (默认)

  • true

forticloud_access_token

字符串

使用 forticloud API 访问令牌验证 Ansible 客户端。

proposed_method

字符串

用于基础 Json RPC 请求的重写方法。

选项

  • "update"

  • "set"

  • "add"

rc_failed

列表 / 元素=整数

将覆盖失败条件的 rc 代码列表。

rc_succeeded

列表 / 元素=整数

将覆盖成功条件的 rc 代码列表。

state

字符串 / 必需

创建、更新或删除对象的指令。

选项

  • "present"

  • "absent"

switchcontroller_managedswitch

字典

设置的顶层参数。

802_1X_settings

别名: 802-1X-settings

字典

802 1X 设置。

link_down_auth

别名: link-down-auth

字符串

如果链接关闭,则设置的身份验证状态。

选项

  • "set-unauth"

  • "no-action"

local_override

别名: local-override

字符串

启用以覆盖全局 802。

选项

  • "disable"

  • "enable"

mab_reauth

别名: mab-reauth

字符串

启用或禁用 MAB 重新身份验证设置。

选项

  • "disable"

  • "enable"

mac_called_station_delimiter

别名: mac-called-station-delimiter

字符串

MAC 被叫站分隔符

选项

  • "hyphen"

  • "single-hyphen"

  • "colon"

  • "none"

mac_calling_station_delimiter

别名: mac-calling-station-delimiter

字符串

MAC 主叫站分隔符

选项

  • "hyphen"

  • "single-hyphen"

  • "colon"

  • "none"

mac_case

别名: mac-case

字符串

MAC 大小写

选项

  • "uppercase"

  • "lowercase"

mac_password_delimiter

别名: mac-password-delimiter

字符串

MAC 身份验证密码分隔符

选项

  • "hyphen"

  • "single-hyphen"

  • "colon"

  • "none"

mac_username_delimiter

别名: mac-username-delimiter

字符串

MAC 身份验证用户名分隔符

选项

  • "hyphen"

  • "single-hyphen"

  • "colon"

  • "none"

max_reauth_attempt

别名: max-reauth-attempt

整数

最大身份验证尝试次数

reauth_period

别名: reauth-period

整数

重新身份验证时间间隔

tx_period

别名: tx-period

整数

_platform

字符串

平台。

access_profile

别名: access-profile

任意

(列表)FortiSwitch 访问配置文件。

custom_command

别名: custom-command

列表 / 元素=字典

自定义命令。

command_entry

别名: command-entry

字符串

FortiSwitch 命令列表。

command_name

别名: command-name

字符串

要推送到此 FortiSwitch 设备的命令名称,如 config switch-controller custom-com… 下配置的那样。

delayed_restart_trigger

别名: delayed-restart-trigger

整数

为此 FortiSwitch 触发的延迟重启。

description

字符串

描述。

dhcp_server_access_list

别名: dhcp-server-access-list

字符串

DHCP 侦听服务器访问列表。

选项

  • "disable"

  • "enable"

  • "global"

dhcp_snooping_static_client

别名: dhcp-snooping-static-client

列表 / 元素=字典

DHCP 侦听静态客户端。

ip

字符串

客户端静态 IP 地址。

mac

字符串

客户端 MAC 地址。

name

字符串

客户端名称。

port

字符串

接口名称。

vlan

字符串

VLAN 名称。

directly_connected

别名: directly-connected

整数

直接连接。

dynamic_capability

别名: dynamic-capability

字符串

此 FortiSwitch 支持的功能列表

dynamically_discovered

别名: dynamically-discovered

整数

动态发现。

firmware_provision

别名: firmware-provision

字符串

启用/禁用在加入连接时向 FortiSwitch 预置固件。

选项

  • "disable"

  • "enable"

firmware_provision_latest

别名: firmware-provision-latest

字符串

启用/禁用一次性自动预置最新固件版本。

选项

  • "disable"

  • "once"

firmware_provision_version

别名: firmware-provision-version

字符串

在启动时预置到此 FortiSwitch 的固件版本

flow_identity

别名: flow-identity

字符串

十六进制格式的流跟踪 netflow ipfix 交换机标识

fsw_wan1_admin

别名: fsw-wan1-admin

字符串

FortiSwitch WAN1 管理状态;启用以授权 FortiSwitch 作为托管交换机。

选项

  • "disable"

  • "enable"

  • "discovered"

fsw_wan1_peer

别名: fsw-wan1-peer

任意

(列表)FortiSwitch WAN1 对等端口。

fsw_wan2_admin

别名: fsw-wan2-admin

字符串

FortiSwitch WAN2 管理状态;启用以授权 FortiSwitch 作为托管交换机。

选项

  • "disable"

  • "enable"

  • "discovered"

fsw_wan2_peer

别名: fsw-wan2-peer

字符串

FortiSwitch WAN2 对等端口。

igmp_snooping

别名: igmp-snooping

字典

IGMP 侦听。

aging_time

别名: aging-time

整数

保留未看到数据包的多播侦听条目的最大时间

flood_unknown_multicast

别名: flood-unknown-multicast

字符串

启用/禁用未知多播泛洪。

选项

  • "disable"

  • "enable"

local_override

别名: local-override

字符串

启用/禁用覆盖全局 IGMP 侦听配置。

选项

  • "disable"

  • "enable"

vlans

列表 / 元素=字典

VLAN。

proxy

字符串

VLAN 接口的 IGMP 侦听代理。

选项

  • "disable"

  • "enable"

  • "global"

querier

字符串

启用/禁用 VLAN 接口的 IGMP 侦听查询器。

选项

  • "disable"

  • "enable"

querier_addr

别名: querier-addr

字符串

IGMP 侦听查询器地址。

version

整数

IGMP 侦听查询版本。

vlan_name

别名: vlan-name

任意

(列表)FortiSwitch VLAN 列表。

ip_source_guard

别名: ip-source-guard

列表 / 元素=字典

IP 源保护。

binding_entry

别名: binding-entry

列表 / 元素=字典

绑定条目。

entry_name

别名: entry-name

字符串

配置绑定对。

ip

字符串

此规则的源 IP。

mac

字符串

此规则的 MAC 地址。

description

字符串

描述。

port

字符串

源保护绑定到的入口接口。

l3_discovered

别名: l3-discovered

整数

L3 已发现。

max_allowed_trunk_members

别名: max-allowed-trunk-members

整数

FortiSwitch 允许的最大中继成员数。

mclag_igmp_snooping_aware

别名: mclag-igmp-snooping-aware

字符串

启用/禁用 MCLAG IGMP 侦听感知。

选项

  • "disable"

  • "enable"

mgmt_mode

别名: mgmt-mode

整数

FortiLink 管理模式。

mirror

列表 / 元素=字典

镜像。

dst

字符串

目标端口。

name

字符串

镜像名称。

src_egress

别名: src-egress

任意

(列表)源出口接口。

src_ingress

别名: src-ingress

任意

(列表)源入口接口。

status

字符串

活动/非活动镜像配置。

选项

  • "inactive"

  • "active"

switching_packet

别名: switching-packet

字符串

启用/禁用镜像时的交换功能。

选项

  • "disable"

  • "enable"

name

字符串

托管交换机名称。

override_snmp_community

别名: override-snmp-community

字符串

启用/禁用覆盖全局 SNMP 社区。

选项

  • "disable"

  • "enable"

override_snmp_sysinfo

别名: override-snmp-sysinfo

字符串

启用/禁用覆盖全局 SNMP 系统信息。

选项

  • "disable"

  • "enable"

override_snmp_trap_threshold

别名: override-snmp-trap-threshold

字符串

启用/禁用覆盖全局 SNMP 陷阱阈值。

选项

  • "disable"

  • "enable"

override_snmp_user

别名: override-snmp-user

字符串

启用/禁用覆盖全局 SNMP 用户。

选项

  • "disable"

  • "enable"

owner_vdom

别名: owner-vdom

字符串

端口所有者所属的 VDOM。

poe_detection_type

别名: poe-detection-type

整数

PoE 检测类型。

poe_lldp_detection

别名: poe-lldp-detection

字符串

启用/禁用 PoE LLDP 检测。

选项

  • "disable"

  • "enable"

poe_pre_standard_detection

别名: poe-pre-standard-detection

字符串

启用/禁用 PoE 预标准检测。

选项

  • "disable"

  • "enable"

ports

列表 / 元素=字典

端口。

access_mode

别名: access-mode

字符串

端口的访问模式。

选项

  • "normal"

  • "nac"

  • "dynamic"

  • "static"

acl_group

别名: acl-group

任意

(列表)此端口上的 ACL 组。

aggregator_mode

别名: aggregator-mode

字符串

LACP 成员选择模式。

选项

  • "bandwidth"

  • "count"

allow_arp_monitor

别名: allow-arp-monitor

字符串

启用/禁用允许 ARP 监视器。

选项

  • "disable"

  • "enable"

allowed_vlans

别名: allowed-vlans

任意

(列表或字符串)配置交换机端口标记的 VLAN

allowed_vlans_all

别名: allowed-vlans-all

字符串

启用/禁用此端口上的所有已定义 VLAN。

选项

  • "disable"

  • "enable"

arp_inspection_trust

别名: arp-inspection-trust

字符串

受信任或不受信任的动态 ARP 检查。

选项

  • "untrusted"

  • "trusted"

authenticated_port

别名: authenticated-port

整数

已验证的端口。

bundle

字符串

启用/禁用链路聚合组

选项

  • "disable"

  • "enable"

description

字符串

端口描述。

dhcp_snoop_option82_override

别名: dhcp-snoop-option82-override

列表 / 元素=字典

DHCP 侦听选项 82 覆盖。

circuit_id

别名: circuit-id

字符串

电路 ID 字符串。

remote_id

别名: remote-id

字符串

远程 ID 字符串。

vlan_name

别名: vlan-name

字符串

DHCP 侦听选项 82 VLAN。

dhcp_snoop_option82_trust

别名: dhcp-snoop-option82-trust

字符串

启用/禁用在非信任接口上允许使用选项 82 的 DHCP。

选项

  • "disable"

  • "enable"

dhcp_snooping

别名: dhcp-snooping

字符串

受信任或非信任的 DHCP 侦听接口。

选项

  • "trusted"

  • "untrusted"

discard_mode

别名: discard-mode

字符串

配置端口的丢弃模式。

选项

  • "none"

  • "all-untagged"

  • "all-tagged"

dot1x_enable

别名: dot1x-enable

字符串

启用 Dot1x。

选项

  • "disable"

  • "enable"

dsl_profile

别名: dsl-profile

字符串

DSL 策略配置。

edge_port

别名: edge-port

字符串

启用/禁用此接口作为边缘端口,用于桥接工作站和/或计算机之间的连接。

选项

  • "disable"

  • "enable"

encrypted_port

别名: encrypted-port

整数

加密端口。

export_tags

别名: export-tags

任意

(列表) 配置导出标签

export_to

别名: export-to

任意

(列表) 将受管交换机端口导出到租户 VDOM。

export_to_pool

别名: export-to-pool

任意

(列表) 将交换机控制器端口导出到池列表。

export_to_pool_flag

别名: export-to-pool-flag

整数

将交换机控制器端口导出到池列表。

fallback_port

别名: fallback-port

字符串

LACP 备用端口。

fec_capable

别名: fec-capable

整数

支持 FEC。

fec_state

别名: fec-state

字符串

前向纠错的状态。

选项

  • "disabled"

  • "cl74"

  • "cl91"

  • "detect-by-module"

fgt_peer_device_name

别名: fgt-peer-device-name

字符串

Fgt 对等设备名称。

fgt_peer_port_name

别名: fgt-peer-port-name

字符串

Fgt 对等端口名称。

fiber_port

别名: fiber-port

整数

光纤端口。

flags

整数

标志。

flap_duration

别名: flap-duration

整数

计算抖动事件的时间段

flap_rate

别名: flap-rate

整数

在抖动持续时间内需要的阶段更改事件数。

flap_timeout

别名: flap-timeout

整数

抖动保护禁用超时

flapguard

字符串

启用/禁用抖动保护。

选项

  • "disable"

  • "enable"

flow_control

别名: flow-control

字符串

流控制方向。

选项

  • "disable"

  • "tx"

  • "rx"

  • "both"

fortilink_port

别名: fortilink-port

整数

Fortilink 端口。

fortiswitch_acls

别名: fortiswitch-acls

任意

(列表) 此端口上的 ACL。

igmp_snooping

别名: igmp-snooping

字符串

为物理端口接口设置 IGMP 侦听模式。

选项

  • "disable"

  • "enable"

igmp_snooping_flood_reports

别名: igmp-snooping-flood-reports

字符串

当启用 igmp-snooping 时,启用/禁用将 IGMP 报告泛洪到此接口。

选项

  • "disable"

  • "enable"

igmps_flood_reports

别名: igmps-flood-reports

字符串

当启用 igmp-snooping 时,启用/禁用将 IGMP 报告泛洪到此接口。

选项

  • "disable"

  • "enable"

igmps_flood_traffic

别名: igmps-flood-traffic

字符串

启用/禁用将 IGMP 侦听流量泛洪到此接口。

选项

  • "disable"

  • "enable"

interface_tags

别名: interface-tags

任意

(列表或字符串) 标签

ip_source_guard

别名: ip-source-guard

字符串

启用/禁用 IP 源保护。

选项

  • "disable"

  • "enable"

isl_local_trunk_name

别名: isl-local-trunk-name

字符串

Isl 本地中继名称。

isl_peer_device_name

别名: isl-peer-device-name

字符串

Isl 对等设备名称。

isl_peer_device_sn

别名: isl-peer-device-sn

字符串

Isl 对等设备序列号。

isl_peer_port_name

别名: isl-peer-port-name

字符串

Isl 对等端口名称。

lacp_speed

别名: lacp-speed

字符串

链路聚合控制协议的结束

选项

  • "slow"

  • "fast"

learning_limit

别名: learning-limit

整数

限制此端口上的动态 MAC 地址数量

link_status

别名: link-status

字符串

链路状态。

选项

  • "down"

  • "up"

lldp_profile

别名: lldp-profile

字符串

LLDP 端口 TLV 配置文件。

lldp_status

别名: lldp-status

字符串

LLDP 发送和接收状态。

选项

  • "disable"

  • "rx-only"

  • "tx-only"

  • "tx-rx"

log_mac_event

别名: log-mac-event

字符串

启用/禁用动态 MAC 地址事件的日志记录。

选项

  • "disable"

  • "enable"

loop_guard

别名: loop-guard

字符串

在此接口上启用/禁用环路保护,这是一种用于防止网络环路的 STP 优化。

选项

  • "disabled"

  • "enabled"

loop_guard_timeout

别名: loop-guard-timeout

整数

环路保护超时

mac_addr

别名: mac-addr

字符串

端口/中继 MAC。

matched_dpp_intf_tags

别名: matched-dpp-intf-tags

字符串

动态端口策略中匹配的接口标签。

matched_dpp_policy

别名: matched-dpp-policy

字符串

动态端口策略中匹配的子策略。

max_bundle

别名: max-bundle

整数

LAG 捆绑的最大大小

max_miss_heartbeats

别名: max-miss-heartbeats

整数

最大容忍错过的心跳数。

mcast_snooping_flood_traffic

别名: mcast-snooping-flood-traffic

字符串

启用/禁用将 IGMP 侦听流量泛洪到此接口。

选项

  • "disable"

  • "enable"

mclag

字符串

启用/禁用多机箱链路聚合

选项

  • "disable"

  • "enable"

mclag_icl_port

别名: mclag-icl-port

整数

Mclag icl 端口。

media_type

别名: media-type

字符串

介质类型。

member_withdrawal_behavior

别名: member-withdrawal-behavior

字符串

端口在因丢失控制数据包而退出后的行为。

选项

  • "forward"

  • "block"

members

任意

(列表) 聚合的 LAG 捆绑接口。

min_bundle

别名: min-bundle

整数

LAG 捆绑的最小大小

mode

字符串

LACP 模式

选项

  • "static"

  • "lacp-passive"

  • "lacp-active"

p2p_port

别名: p2p-port

整数

P2p 端口。

packet_sample_rate

别名: packet-sample-rate

整数

数据包采样率

packet_sampler

别名: packet-sampler

字符串

启用/禁用此接口上的数据包采样。

选项

  • "disabled"

  • "enabled"

pause_meter

别名: pause-meter

整数

配置入口暂停计量速率,单位为 kbps

pause_meter_resume

别名: pause-meter-resume

字符串

恢复入口端口上流量的恢复阈值。

选项

  • "25%"

  • "50%"

  • "75%"

pd_capable

别名: pd-capable

整数

支持受电设备。

poe_capable

别名: poe-capable

整数

是否支持 PoE。

poe_max_power

别名: poe-max-power

字符串

PoE 最大功率。

poe_mode_bt_cabable

别名: poe-mode-bt-cabable

整数

PoE 模式 IEEE 802。

poe_port_mode

别名: poe-port-mode

字符串

配置 PoE 端口模式。

选项

  • "ieee802-3af"

  • "ieee802-3at"

  • "ieee802-3bt"

poe_port_power

别名: poe-port-power

字符串

配置 PoE 端口功率。

选项

  • "normal"

  • "perpetual"

  • "perpetual-fast"

poe_port_priority

别名: poe-port-priority

字符串

配置 PoE 端口优先级。

选项

  • "critical-priority"

  • "high-priority"

  • "low-priority"

  • "medium-priority"

poe_pre_standard_detection

别名: poe-pre-standard-detection

字符串

启用/禁用 PoE 预标准检测。

选项

  • "disable"

  • "enable"

poe_standard

别名: poe-standard

字符串

PoE 标准。

poe_status

别名: poe-status

字符串

启用/禁用 PoE 状态。

选项

  • "disable"

  • "enable"

port_name

别名: port-name

字符串

交换机端口名称。

port_number

别名: port-number

整数

端口号。

port_owner

别名: port-owner

字符串

交换机端口名称。

port_policy

别名: port-policy

字符串

从可用选项中选择交换机控制器动态端口策略。

port_prefix_type

别名: port-prefix-type

整数

端口前缀类型。

port_security_policy

别名: port-security-policy

字符串

从可用选项中选择应用于此受管交换机的交换机控制器身份验证策略。

port_selection_criteria

别名: port-selection-criteria

字符串

聚合端口选择的算法。

选项

  • "src-mac"

  • "dst-mac"

  • "src-dst-mac"

  • "src-ip"

  • "dst-ip"

  • "src-dst-ip"

ptp_policy

别名: ptp-policy

任意

(列表)PTP 策略配置。

ptp_status

别名: ptp-status

字符串

在此 FortiSwitch 端口上启用/禁用 PTP 策略。

选项

  • "disable"

  • "enable"

qnq

任意

(列表)'802.'

qos_policy

别名: qos-policy

字符串

从可用选项中选择交换机控制器 QoS 策略。

restricted_auth_port

别名: restricted-auth-port

整数

受限身份验证端口。

rpvst_port

别名: rpvst-port

字符串

在此接口上启用/禁用与快速 PVST 的互操作性。

选项

  • "disabled"

  • "enabled"

sample_direction

别名: sample-direction

字符串

SFlow 采样方向。

选项

  • "rx"

  • "tx"

  • "both"

sflow_counter_interval

别名: sflow-counter-interval

整数

SFlow 采样器计数器轮询间隔。

sflow_sample_rate

别名: sflow-sample-rate

整数

SFlow 采样器采样率。

sflow_sampler

别名: sflow-sampler

字符串

在此接口上启用/禁用 sFlow 协议。

选项

  • "disabled"

  • "enabled"

speed

字符串

交换机端口速度;默认值和可用设置取决于硬件。

选项

  • "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

别名: speed-mask

整数

交换机端口速度掩码。

stacking_port

别名: stacking-port

整数

堆叠端口。

status

字符串

交换机端口管理状态。

选项

  • "down"

  • "up"

sticky_mac

别名: sticky-mac

字符串

在接口上启用或禁用 sticky-mac。

选项

  • "disable"

  • "enable"

storm_control_policy

别名: storm-control-policy

字符串

从可用选项中选择交换机控制器风暴控制策略。

stp_bpdu_guard

别名: stp-bpdu-guard

字符串

在此接口上启用/禁用 STP BPDU 防护。

选项

  • "disabled"

  • "enabled"

stp_bpdu_guard_timeout

别名: stp-bpdu-guard-timeout

整数

BPDU 防护禁用保护。

stp_root_guard

别名: stp-root-guard

字符串

在此接口上启用/禁用 STP 根防护。

选项

  • "disabled"

  • "enabled"

stp_state

别名: stp-state

字符串

启用/禁用生成树协议。

选项

  • "disabled"

  • "enabled"

switch_id

别名: switch-id

字符串

交换机 ID。

trunk_member

别名: trunk-member

整数

中继成员。

type

字符串

接口类型。

选项

  • "physical"

  • "trunk"

untagged_vlans

别名: untagged-vlans

任意

(列表或字符串)配置交换机端口未标记的 VLAN。

virtual_port

别名: virtual-port

整数

虚拟化交换机端口。

vlan

字符串

将交换机端口分配给 VLAN。

pre_provisioned

别名: pre-provisioned

整数

预配置的受管交换机。

ptp_profile

别名: ptp-profile

字符串

PTP 配置文件。

ptp_status

别名: ptp-status

字符串

在此 FortiSwitch 上启用/禁用 PTP 配置文件。

选项

  • "disable"

  • "enable"

purdue_level

别名: purdue-level

字符串

此 FortiSwitch 的 Purdue 级别。

选项

  • "1"

  • "2"

  • "3"

  • "4"

  • "5"

  • "1.5"

  • "2.5"

  • "3.5"

  • "5.5"

qos_drop_policy

别名: qos-drop-policy

字符串

设置 QoS 丢弃策略。

选项

  • "taildrop"

  • "random-early-detection"

qos_red_probability

别名: qos-red-probability

整数

设置 QoS RED/WRED 丢弃概率。

radius_nas_ip

别名: radius-nas-ip

字符串

NAS-IP 地址。

radius_nas_ip_override

别名: radius-nas-ip-override

字符串

使用本地定义的 NAS-IP。

选项

  • "disable"

  • "enable"

remote_log

别名: remote-log

列表 / 元素=字典

远程日志。

csv

字符串

启用/禁用逗号分隔值。

选项

  • "disable"

  • "enable"

facility

字符串

记录到远程 syslog 服务器的设备。

选项

  • "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

字符串

远程日志名称。

port

整数

远程 syslog 服务器侦听端口。

server

字符串

远程 syslog 服务器的 IPv4 地址。

severity

字符串

要传输到远程日志服务器的日志严重性。

选项

  • "emergency"

  • "alert"

  • "critical"

  • "error"

  • "warning"

  • "notification"

  • "information"

  • "debug"

status

字符串

启用/禁用 FortiSwitch 设备将日志记录到远程 syslog 服务器。

选项

  • "disable"

  • "enable"

route_offload

别名: route-offload

字符串

在此 FortiSwitch 上启用/禁用路由卸载。

选项

  • "disable"

  • "enable"

route_offload_mclag

别名: route-offload-mclag

字符串

在此 FortiSwitch 上启用/禁用路由卸载 MCLAG。

选项

  • "disable"

  • "enable"

route_offload_router

别名: route-offload-router

列表 / 元素=字典

路由卸载路由器。

router_ip

别名: router-ip

字符串

路由器 IP 地址。

vlan_name

别名: vlan-name

字符串

VLAN 名称。

sn

字符串

受管交换机的序列号。

snmp_community

别名: snmp-community

列表 / 元素=字典

SNMP 团体。

events

列表 / 元素=字符串

SNMP 通知

选项

  • "cpu-high"

  • "mem-low"

  • "log-full"

  • "intf-ip"

  • "ent-conf-change"

  • "l2mac"

hosts

列表 / 元素=字典

主机。

id

整数

主机条目 ID。

ip

字符串

SNMP 管理器的 IPv4 地址

id

整数

SNMP 团体 ID。

name

字符串

SNMP 团体名称。

query_v1_port

别名: query-v1-port

整数

SNMP v1 查询端口

query_v1_status

别名: query-v1-status

字符串

启用/禁用 SNMP v1 查询。

选项

  • "disable"

  • "enable"

query_v2c_port

别名: query-v2c-port

整数

SNMP v2c 查询端口

query_v2c_status

别名: query-v2c-status

字符串

启用/禁用 SNMP v2c 查询。

选项

  • "disable"

  • "enable"

status

字符串

启用/禁用此 SNMP 团体。

选项

  • "disable"

  • "enable"

trap_v1_lport

别名: trap-v1-lport

整数

SNMP v2c 陷阱本地端口

trap_v1_rport

别名: trap-v1-rport

整数

SNMP v2c 陷阱远程端口

trap_v1_status

别名: trap-v1-status

字符串

启用/禁用 SNMP v1 陷阱。

选项

  • "disable"

  • "enable"

trap_v2c_lport

别名: trap-v2c-lport

整数

SNMP v2c 陷阱本地端口

trap_v2c_rport

别名: trap-v2c-rport

整数

SNMP v2c 陷阱远程端口

trap_v2c_status

别名: trap-v2c-status

字符串

启用/禁用 SNMP v2c 陷阱。

选项

  • "disable"

  • "enable"

snmp_sysinfo

别名: snmp-sysinfo

字典

SNMP 系统信息。

contact_info

别名: contact-info

字符串

联系信息。

description

字符串

系统描述。

engine_id

别名: engine-id

字符串

本地 SNMP 引擎 ID 字符串

location

字符串

系统位置。

status

字符串

启用/禁用 SNMP。

选项

  • "disable"

  • "enable"

snmp_trap_threshold

别名: snmp-trap-threshold

字典

SNMP 陷阱阈值。

trap_high_cpu_threshold

别名: trap-high-cpu-threshold

整数

发送陷阱时的 CPU 使用率。

trap_log_full_threshold

别名: trap-log-full-threshold

整数

发送陷阱时的日志磁盘使用率。

trap_low_memory_threshold

别名: trap-low-memory-threshold

整数

发送陷阱时的内存使用率。

snmp_user

别名: snmp-user

列表 / 元素=字典

SNMP 用户。

auth_proto

别名: auth-proto

字符串

身份验证协议。

选项

  • "md5"

  • "sha"

  • "sha1"

  • "sha256"

  • "sha384"

  • "sha512"

  • "sha224"

auth_pwd

别名: auth-pwd

任意

(列表) 用于身份验证协议的密码。

name

字符串

SNMP 用户名。

priv_proto

别名: priv-proto

字符串

隐私

选项

  • "des"

  • "aes"

  • "aes128"

  • "aes192"

  • "aes256"

  • "aes192c"

  • "aes256c"

priv_pwd

别名: priv-pwd

任意

(列表) 用于隐私的密码

queries

字符串

为此用户启用/禁用 SNMP 查询。

选项

  • "disable"

  • "enable"

query_port

别名: query-port

整数

SNMPv3 查询端口

security_level

别名: security-level

字符串

消息身份验证和加密的安全级别。

选项

  • "no-auth-no-priv"

  • "auth-no-priv"

  • "auth-priv"

staged_image_version

别名: staged-image-version

字符串

FortiSwitch 的暂存镜像版本。

static_mac

别名: static-mac

列表 / 元素=字典

静态 MAC。

description

字符串

描述。

id

整数

ID。

interface

字符串

接口名称。

mac

字符串

MAC 地址。

type

字符串

类型。

选项

  • "static"

  • "sticky"

vlan

任意

(列表) VLAN。

storm_control

别名: storm-control

字典

风暴控制。

broadcast

字符串

启用/禁用风暴控制以丢弃广播流量。

选项

  • "disable"

  • "enable"

local_override

别名: local-override

字符串

启用以覆盖此 FortiSwitch 的全局 FortiSwitch 风暴控制设置。

选项

  • "disable"

  • "enable"

rate

整数

风暴控制丢弃过多流量的速率,单位为每秒数据包数

unknown_multicast

别名: unknown-multicast

字符串

启用/禁用风暴控制以丢弃未知组播流量。

选项

  • "disable"

  • "enable"

unknown_unicast

别名: unknown-unicast

字符串

启用/禁用风暴控制以丢弃未知单播流量。

选项

  • "disable"

  • "enable"

stp_instance

别名: stp-instance

列表 / 元素=字典

STP 实例。

id

字符串

实例 ID。

priority

字符串

优先级。

选项

  • "0"

  • "4096"

  • "8192"

  • "12288"

  • "12328"

  • "16384"

  • "20480"

  • "24576"

  • "28672"

  • "32768"

  • "36864"

  • "40960"

  • "45056"

  • "49152"

  • "53248"

  • "57344"

  • "61440"

stp_settings

别名: stp-settings

字典

STP 设置。

forward_time

别名: forward-time

整数

端口处于侦听和学习状态的时间段

hello_time

别名: hello-time

整数

连续 STP 帧网桥协议数据单元之间的时间段

local_override

别名: local-override

字符串

启用以配置覆盖全局 STP 设置的本地 STP 设置。

选项

  • "disable"

  • "enable"

max_age

别名: max-age

整数

网桥端口保存其配置 BPDU 信息的最长时间

max_hops

别名: max-hops

整数

根网桥和最远网桥之间的最大跳数

name

字符串

本地 STP 设置配置的名称。

pending_timer

别名:pending-timer

整数

挂起时间

revision

整数

STP 修订号

status

字符串

启用/禁用 STP。

选项

  • "disable"

  • "enable"

switch_device_tag

别名:switch-device-tag

字符串

用户可定义的标签/标记。

switch_dhcp_opt43_key

别名:switch-dhcp_opt43_key

字符串

DHCP 选项 43 密钥。

switch_id

别名: switch-id

字符串 / 必需

被管理交换机的 ID。

switch_log

别名:switch-log

字典

交换机日志。

local_override

别名: local-override

字符串

启用此项以配置覆盖全局日志设置的本地日志设置。

选项

  • "disable"

  • "enable"

severity

字符串

添加到 FortiGate 事件日志的 FortiSwitch 日志的严重级别。

选项

  • "emergency"

  • "alert"

  • "critical"

  • "error"

  • "warning"

  • "notification"

  • "information"

  • "debug"

status

字符串

启用/禁用将 FortiSwitch 日志添加到 FortiGate 事件日志。

选项

  • "disable"

  • "enable"

switch_profile

别名:switch-profile

任意

(列表) FortiSwitch 配置文件。

tdr_supported

别名:tdr-supported

字符串

支持 TDR。

tunnel_discovered

别名:tunnel-discovered

整数

已发现隧道。

type

字符串

交换机类型的指示,物理或虚拟。

选项

  • "physical"

  • "virtual"

版本

整数

FortiSwitch 版本。

vlan

列表 / 元素=字典

Vlan。

assignment_priority

别名:assignment-priority

整数

vlan_name

别名: vlan-name

字符串

VLAN 名称。

workspace_locking_adom

字符串

在工作区模式下运行的 FortiManager 要锁定的 ADOM,该值可以是 global 和其他值,包括 root。

workspace_locking_timeout

整数

等待其他用户释放工作区锁定的最长时间(以秒为单位)。

默认值: 300

备注

注意

  • 从 2.4.0 版本开始,所有输入参数都使用下划线命名约定 (snake_case) 命名。请将 “var-name” 等参数更改为 “var_name”。旧的参数名称仍然可用,但您会收到弃用警告。您可以通过在 ansible.cfg 中设置 deprecation_warnings=False 来忽略此警告。

  • 此 FortiManager 模块支持在工作区锁定模式下运行,顶层参数 workspace_locking_adom 和 workspace_locking_timeout 有助于完成此工作。

  • 要创建或更新对象,请使用 state present 指令。

  • 要删除对象,请使用 state absent 指令。

  • 通常,当返回非零 rc 时,运行一个模块可能会失败。您还可以使用参数 rc_failed 和 rc_succeeded 覆盖失败或成功的条件

示例

- 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]>

返回值

常用的返回值记录在这里,以下是此模块特有的字段

描述

meta

字典

请求的结果。

返回值: 总是

request_url

字符串

请求的完整 URL。

返回值: 总是

示例: "/sys/login/user"

response_code

整数

API 请求的状态。

返回值: 总是

示例: 0

response_data

列表 / 元素=字符串

API 响应。

返回值: 总是

response_message

字符串

API 响应的描述性消息。

返回值: 总是

示例: "OK."

system_information

字典

目标系统的信息。

返回值: 总是

rc

整数

请求的状态。

返回值: 总是

示例: 0

version_check_warning

列表 / 元素=字符串

如果 playbook 中使用的参数不受当前 FortiManager 版本支持,则发出警告。

返回值: 复杂

作者

  • Xinwei Du (@dux-fortinet)

  • Xing Li (@lix-fortinet)

  • Jie Xue (@JieX19)

  • Link Zheng (@chillancezen)

  • Frank Shen (@fshen01)

  • Hongbin Lu (@fgtdev-hblu)