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

Added in version 2.0.0.

Warning

Starting in version 3.0.0, all input arguments will be named using the underscore naming convention (snake_case).

  • Argument name before 3.0.0: var-name, var name, var.name

  • New argument name starting in 3.0.0: var_name

FortiManager Ansible v2.4+ supports both previous argument name and new underscore name. You will receive deprecation warnings if you keep using the previous argument name. You can ignore the warning by setting deprecation_warnings=False in ansible.cfg.

Synopsis

  • This module is able to configure a FortiManager device.

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

  • Tested with FortiManager v6.x and v7.x.

Requirements

The below requirements are needed on the host that executes this module.

  • ansible>=2.15.0

FortiManager Version Compatibility

Supported Version Ranges: v6.0.0 -> latest

Parameters

  • access_token -The token to access FortiManager without using username and password. type: str required: false
  • bypass_validation - Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters. type: bool required: false default: False
  • enable_log - Enable/Disable logging for task. type: bool required: false default: False
  • forticloud_access_token - Access token of forticloud managed API users, this option is available with FortiManager later than 6.4.0. type: str required: false
  • proposed_method - The overridden method for the underlying Json RPC request. type: str required: false choices: set, update, add
  • rc_succeeded - The rc codes list with which the conditions to succeed will be overriden. type: list required: false
  • rc_failed - The rc codes list with which the conditions to fail will be overriden. type: list required: false
  • state - The directive to create, update or delete an object type: str required: true choices: present, absent
  • workspace_locking_adom - Acquire the workspace lock if FortiManager is running in workspace mode. type: str required: false choices: global, custom adom including root
  • workspace_locking_timeout - The maximum time in seconds to wait for other users to release workspace lock. type: integer required: false default: 300
  • adom - The parameter in requested url type: str required: true
  • switchcontroller_managedswitch - Configure FortiSwitch devices that are managed by this FortiGate. type: dict
    • _platform _platform. type: str more...
    • description Description. type: str more...
    • name Managed-switch name. type: str more...
    • ports Ports. type: list more...
      • allowed_vlans (Alias name: allowed-vlans) Configure switch port tagged vlans type: list or str more...
      • allowed_vlans_all (Alias name: allowed-vlans-all) Enable/disable all defined vlans on this port. type: str choices: [disable, enable] more...
      • arp_inspection_trust (Alias name: arp-inspection-trust) Trusted or untrusted dynamic arp inspection. type: str choices: [untrusted, trusted] more...
      • bundle Enable/disable link aggregation group (lag) bundling for non-fortilink interfaces. type: str choices: [disable, enable] more...
      • description Description for port. type: str more...
      • dhcp_snoop_option82_trust (Alias name: dhcp-snoop-option82-trust) Enable/disable allowance of dhcp with option-82 on untrusted interface. type: str choices: [disable, enable] more...
      • dhcp_snooping (Alias name: dhcp-snooping) Trusted or untrusted dhcp-snooping interface. type: str choices: [trusted, untrusted] more...
      • discard_mode (Alias name: discard-mode) Configure discard mode for port. type: str choices: [none, all-untagged, all-tagged] more...
      • edge_port (Alias name: edge-port) Enable/disable this interface as an edge port, bridging connections between workstations and/or computers. type: str choices: [disable, enable] more...
      • igmp_snooping (Alias name: igmp-snooping) Set igmp snooping mode for the physical port interface. type: str choices: [disable, enable] more...
      • igmps_flood_reports (Alias name: igmps-flood-reports) Enable/disable flooding of igmp reports to this interface when igmp-snooping enabled. type: str choices: [disable, enable] more...
      • igmps_flood_traffic (Alias name: igmps-flood-traffic) Enable/disable flooding of igmp snooping traffic to this interface. type: str choices: [disable, enable] more...
      • lacp_speed (Alias name: lacp-speed) End link aggregation control protocol (lacp) messages every 30 seconds (slow) or every second (fast). type: str choices: [slow, fast] more...
      • learning_limit (Alias name: learning-limit) Limit the number of dynamic mac addresses on this port (1 - 128, 0 = no limit, default). type: int more...
      • lldp_profile (Alias name: lldp-profile) Lldp port tlv profile. type: str more...
      • lldp_status (Alias name: lldp-status) Lldp transmit and receive status. type: str choices: [disable, rx-only, tx-only, tx-rx] more...
      • loop_guard (Alias name: loop-guard) Enable/disable loop-guard on this interface, an stp optimization used to prevent network loops. type: str choices: [disabled, enabled] more...
      • loop_guard_timeout (Alias name: loop-guard-timeout) Loop-guard timeout (0 - 120 min, default = 45). type: int more...
      • max_bundle (Alias name: max-bundle) Maximum size of lag bundle (1 - 24, default = 24) type: int more...
      • mclag Enable/disable multi-chassis link aggregation (mclag). type: str choices: [disable, enable] more...
      • member_withdrawal_behavior (Alias name: member-withdrawal-behavior) Port behavior after it withdraws because of loss of control packets. type: str choices: [forward, block] more...
      • members Aggregated lag bundle interfaces. type: list more...
      • min_bundle (Alias name: min-bundle) Minimum size of lag bundle (1 - 24, default = 1) type: int more...
      • mode Lacp mode: ignore and do not send control messages, or negotiate 802. type: str choices: [static, lacp-passive, lacp-active] more...
      • poe_pre_standard_detection (Alias name: poe-pre-standard-detection) Enable/disable poe pre-standard detection. type: str choices: [disable, enable] more...
      • poe_status (Alias name: poe-status) Enable/disable poe status. type: str choices: [disable, enable] more...
      • port_name (Alias name: port-name) Switch port name. type: str more...
      • port_owner (Alias name: port-owner) Switch port name. type: str more...
      • port_security_policy (Alias name: port-security-policy) Switch controller authentication policy to apply to this managed switch from available options. type: str more...
      • port_selection_criteria (Alias name: port-selection-criteria) Algorithm for aggregate port selection. type: str choices: [src-mac, dst-mac, src-dst-mac, src-ip, dst-ip, src-dst-ip] more...
      • qos_policy (Alias name: qos-policy) Switch controller qos policy from available options. type: str more...
      • sample_direction (Alias name: sample-direction) Sflow sample direction. type: str choices: [rx, tx, both] more...
      • sflow_counter_interval (Alias name: sflow-counter-interval) Sflow sampler counter polling interval (1 - 255 sec). type: int more...
      • sflow_sample_rate (Alias name: sflow-sample-rate) Sflow sampler sample rate (0 - 99999 p/sec). type: int more...
      • sflow_sampler (Alias name: sflow-sampler) Enable/disable sflow protocol on this interface. type: str choices: [disabled, enabled] more...
      • stp_bpdu_guard (Alias name: stp-bpdu-guard) Enable/disable stp bpdu guard on this interface. type: str choices: [disabled, enabled] more...
      • stp_bpdu_guard_timeout (Alias name: stp-bpdu-guard-timeout) Bpdu guard disabling protection (0 - 120 min). type: int more...
      • stp_root_guard (Alias name: stp-root-guard) Enable/disable stp root guard on this interface. type: str choices: [disabled, enabled] more...
      • stp_state (Alias name: stp-state) Enable/disable spanning tree protocol (stp) on this interface. type: str choices: [disabled, enabled] more...
      • type Interface type: physical or trunk port. type: str choices: [physical, trunk] more...
      • untagged_vlans (Alias name: untagged-vlans) Configure switch port untagged vlans type: list or str more...
      • vlan Assign switch ports to a vlan. type: str more...
      • export_to_pool_flag (Alias name: export-to-pool-flag) Switch controller export port to pool-list. type: int more...
      • mac_addr (Alias name: mac-addr) Port/trunk mac. type: str more...
      • packet_sample_rate (Alias name: packet-sample-rate) Packet sampling rate (0 - 99999 p/sec). type: int more...
      • packet_sampler (Alias name: packet-sampler) Enable/disable packet sampling on this interface. type: str choices: [disabled, enabled] more...
      • sticky_mac (Alias name: sticky-mac) Enable or disable sticky-mac on the interface. type: str choices: [disable, enable] more...
      • storm_control_policy (Alias name: storm-control-policy) Switch controller storm control policy from available options. type: str more...
      • dot1x_enable (Alias name: dot1x-enable) type: str choices: [disable, enable] more...
      • max_miss_heartbeats (Alias name: max-miss-heartbeats) Maximum tolerant missed heartbeats. type: int more...
      • access_mode (Alias name: access-mode) Access mode of the port. type: str choices: [normal, nac, dynamic, static] more...
      • ip_source_guard (Alias name: ip-source-guard) Enable/disable ip source guard. type: str choices: [disable, enable] more...
      • mclag_icl_port (Alias name: mclag-icl-port) Mclag-icl-port. type: int more...
      • p2p_port (Alias name: p2p-port) P2p-port. type: int more...
      • aggregator_mode (Alias name: aggregator-mode) Lacp member select mode. type: str choices: [bandwidth, count] more...
      • rpvst_port (Alias name: rpvst-port) Enable/disable inter-operability with rapid pvst on this interface. type: str choices: [disabled, enabled] more...
      • flow_control (Alias name: flow-control) Flow control direction. type: str choices: [disable, tx, rx, both] more...
      • media_type (Alias name: media-type) Media-type. type: str more...
      • pause_meter (Alias name: pause-meter) Configure ingress pause metering rate, in kbps (default = 0, disabled). type: int more...
      • pause_meter_resume (Alias name: pause-meter-resume) Resume threshold for resuming traffic on ingress port. type: str choices: [25%, 50%, 75%] more...
      • trunk_member (Alias name: trunk-member) Trunk member. type: int more...
      • fec_capable (Alias name: fec-capable) Fec capable. type: int more...
      • fec_state (Alias name: fec-state) State of forward error correction. type: str choices: [disabled, cl74, cl91, detect-by-module] more...
      • matched_dpp_intf_tags (Alias name: matched-dpp-intf-tags) Matched interface tags in the dynamic port policy. type: str more...
      • matched_dpp_policy (Alias name: matched-dpp-policy) Matched child policy in the dynamic port policy. type: str more...
      • port_policy (Alias name: port-policy) Switch controller dynamic port policy from available options. type: str more...
      • status Switch port admin status: up or down. type: str choices: [down, up] more...
      • dsl_profile (Alias name: dsl-profile) Dsl policy configuration. type: str more...
      • flap_duration (Alias name: flap-duration) Period over which flap events are calculated (seconds). type: int more...
      • flap_rate (Alias name: flap-rate) Number of stage change events needed within flap-duration. type: int more...
      • flap_timeout (Alias name: flap-timeout) Flap guard disabling protection (min). type: int more...
      • flapguard Enable/disable flap guard. type: str choices: [disable, enable] more...
      • interface_tags (Alias name: interface-tags) type: list or str more...
      • poe_max_power (Alias name: poe-max-power) type: str more...
      • poe_standard (Alias name: poe-standard) type: str more...
      • igmp_snooping_flood_reports (Alias name: igmp-snooping-flood-reports) Enable/disable flooding of igmp reports to this interface when igmp-snooping enabled. type: str choices: [disable, enable] more...
      • mcast_snooping_flood_traffic (Alias name: mcast-snooping-flood-traffic) Enable/disable flooding of igmp snooping traffic to this interface. type: str choices: [disable, enable] more...
      • link_status (Alias name: link-status) type: str choices: [down, up] more...
      • poe_mode_bt_cabable (Alias name: poe-mode-bt-cabable) Poe mode ieee 802. type: int more...
      • poe_port_mode (Alias name: poe-port-mode) Configure poe port mode. type: str choices: [ieee802-3af, ieee802-3at, ieee802-3bt] more...
      • poe_port_power (Alias name: poe-port-power) Configure poe port power. type: str choices: [normal, perpetual, perpetual-fast] more...
      • poe_port_priority (Alias name: poe-port-priority) Configure poe port priority. type: str choices: [critical-priority, high-priority, low-priority, medium-priority] more...
      • acl_group (Alias name: acl-group) type: list more...
      • dhcp_snoop_option82_override (Alias name: dhcp-snoop-option82-override) type: list more...
        • circuit_id (Alias name: circuit-id) Circuit id string. type: str more...
        • remote_id (Alias name: remote-id) Remote id string. type: str more...
        • vlan_name (Alias name: vlan-name) Dhcp snooping option 82 vlan. type: str more...
      • fortiswitch_acls (Alias name: fortiswitch-acls) type: list more...
      • isl_peer_device_sn (Alias name: isl-peer-device-sn) type: str more...
      • authenticated_port (Alias name: authenticated-port) type: int more...
      • encrypted_port (Alias name: encrypted-port) type: int more...
      • ptp_status (Alias name: ptp-status) Enable/disable ptp policy on this fortiswitch port. type: str choices: [disable, enable] more...
      • restricted_auth_port (Alias name: restricted-auth-port) type: int more...
    • switch_id (Alias name: switch-id) Managed-switch id. type: str more...
    • override_snmp_community (Alias name: override-snmp-community) Enable/disable overriding the global snmp communities. type: str choices: [disable, enable] more...
    • override_snmp_sysinfo (Alias name: override-snmp-sysinfo) Enable/disable overriding the global snmp system information. type: str choices: [disable, enable] more...
    • override_snmp_trap_threshold (Alias name: override-snmp-trap-threshold) Enable/disable overriding the global snmp trap threshold values. type: str choices: [disable, enable] more...
    • override_snmp_user (Alias name: override-snmp-user) Enable/disable overriding the global snmp users. type: str choices: [disable, enable] more...
    • poe_detection_type (Alias name: poe-detection-type) Poe-detection-type. type: int more...
    • remote_log (Alias name: remote-log) type: list more...
      • csv Enable/disable comma-separated value (csv) strings. type: str choices: [disable, enable] more...
      • facility Facility to log to remote syslog server. type: str 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] more...
      • name Remote log name. type: str more...
      • port Remote syslog server listening port. type: int more...
      • server Ipv4 address of the remote syslog server. type: str more...
      • severity Severity of logs to be transferred to remote log server. type: str choices: [emergency, alert, critical, error, warning, notification, information, debug] more...
      • status Enable/disable logging by fortiswitch device to a remote syslog server. type: str choices: [disable, enable] more...
    • snmp_community (Alias name: snmp-community) type: list more...
      • events type: list choices: [cpu-high, mem-low, log-full, intf-ip, ent-conf-change] more...
      • hosts type: list more...
        • id Host entry id. type: int more...
        • ip Ipv4 address of the snmp manager (host). type: str more...
      • id Snmp community id. type: int more...
      • name Snmp community name. type: str more...
      • query_v1_port (Alias name: query-v1-port) Snmp v1 query port (default = 161). type: int more...
      • query_v1_status (Alias name: query-v1-status) Enable/disable snmp v1 queries. type: str choices: [disable, enable] more...
      • query_v2c_port (Alias name: query-v2c-port) Snmp v2c query port (default = 161). type: int more...
      • query_v2c_status (Alias name: query-v2c-status) Enable/disable snmp v2c queries. type: str choices: [disable, enable] more...
      • status Enable/disable this snmp community. type: str choices: [disable, enable] more...
      • trap_v1_lport (Alias name: trap-v1-lport) Snmp v2c trap local port (default = 162). type: int more...
      • trap_v1_rport (Alias name: trap-v1-rport) Snmp v2c trap remote port (default = 162). type: int more...
      • trap_v1_status (Alias name: trap-v1-status) Enable/disable snmp v1 traps. type: str choices: [disable, enable] more...
      • trap_v2c_lport (Alias name: trap-v2c-lport) Snmp v2c trap local port (default = 162). type: int more...
      • trap_v2c_rport (Alias name: trap-v2c-rport) Snmp v2c trap remote port (default = 162). type: int more...
      • trap_v2c_status (Alias name: trap-v2c-status) Enable/disable snmp v2c traps. type: str choices: [disable, enable] more...
    • snmp_user (Alias name: snmp-user) type: list more...
      • auth_proto (Alias name: auth-proto) Authentication protocol. type: str choices: [md5, sha] more...
      • auth_pwd (Alias name: auth-pwd) type: list more...
      • name Snmp user name. type: str more...
      • priv_proto (Alias name: priv-proto) Privacy (encryption) protocol. type: str choices: [des, aes] more...
      • priv_pwd (Alias name: priv-pwd) type: list more...
      • queries Enable/disable snmp queries for this user. type: str choices: [disable, enable] more...
      • query_port (Alias name: query-port) Snmpv3 query port (default = 161). type: int more...
      • security_level (Alias name: security-level) Security level for message authentication and encryption. type: str choices: [no-auth-no-priv, auth-no-priv, auth-priv] more...
    • mclag_igmp_snooping_aware (Alias name: mclag-igmp-snooping-aware) Enable/disable mclag igmp-snooping awareness. type: str choices: [disable, enable] more...
    • ip_source_guard (Alias name: ip-source-guard) type: list more...
      • binding_entry (Alias name: binding-entry) type: list more...
        • entry_name (Alias name: entry-name) Configure binding pair. type: str more...
        • ip Source ip for this rule. type: str more...
        • mac Mac address for this rule. type: str more...
      • description Description. type: str more...
      • port Ingress interface to which source guard is bound. type: str more...
    • l3_discovered (Alias name: l3-discovered) L3-discovered. type: int more...
    • qos_drop_policy (Alias name: qos-drop-policy) Set qos drop-policy. type: str choices: [taildrop, random-early-detection] more...
    • qos_red_probability (Alias name: qos-red-probability) Set qos red/wred drop probability. type: int more...
    • switch_dhcp_opt43_key (Alias name: switch-dhcp_opt43_key) Dhcp option43 key. type: str more...
    • tdr_supported (Alias name: tdr-supported) Tdr-supported. type: str more...
    • custom_command (Alias name: custom-command) Custom-command. type: list more...
      • command_entry (Alias name: command-entry) List of fortiswitch commands. type: str more...
      • command_name (Alias name: command-name) Names of commands to be pushed to this fortiswitch device, as configured under config switch-controller custom-command. type: str more...
    • firmware_provision (Alias name: firmware-provision) Enable/disable provisioning of firmware to fortiswitches on join connection. type: str choices: [disable, enable] more...
    • firmware_provision_version (Alias name: firmware-provision-version) Firmware version to provision to this fortiswitch on bootup (major. type: str more...
    • dhcp_server_access_list (Alias name: dhcp-server-access-list) Dhcp snooping server access list. type: str choices: [disable, enable, global] more...
    • firmware_provision_latest (Alias name: firmware-provision-latest) Enable/disable one-time automatic provisioning of the latest firmware version. type: str choices: [disable, once] more...
    • dhcp_snooping_static_client (Alias name: dhcp-snooping-static-client) type: list more...
      • ip Client static ip address. type: str more...
      • mac Client mac address. type: str more...
      • name Client name. type: str more...
      • port Interface name. type: str more...
      • vlan Vlan name. type: str more...
    • ptp_profile (Alias name: ptp-profile) Ptp profile configuration. type: str more...
    • ptp_status (Alias name: ptp-status) Enable/disable ptp profile on this fortiswitch. type: str choices: [disable, enable] more...
    • route_offload (Alias name: route-offload) Enable/disable route offload on this fortiswitch. type: str choices: [disable, enable] more...
    • route_offload_mclag (Alias name: route-offload-mclag) Enable/disable route offload mclag on this fortiswitch. type: str choices: [disable, enable] more...
    • route_offload_router (Alias name: route-offload-router) type: list more...
      • router_ip (Alias name: router-ip) Router ip address. type: str more...
      • vlan_name (Alias name: vlan-name) Vlan name. type: str more...
    • mgmt_mode (Alias name: mgmt-mode) Fortilink management mode. type: int more...
    • purdue_level (Alias name: purdue-level) Purdue level of this fortiswitch. type: str choices: [1, 2, 3, 4, 5, 1.5, 2.5, 3.5, 5.5] more...
    • radius_nas_ip (Alias name: radius-nas-ip) Nas-ip address. type: str more...
    • radius_nas_ip_override (Alias name: radius-nas-ip-override) Use locally defined nas-ip. type: str choices: [disable, enable] more...
    • tunnel_discovered (Alias name: tunnel-discovered) type: int more...
    • vlan type: list more...
      • assignment_priority (Alias name: assignment-priority) 802. type: int more...
      • vlan_name (Alias name: vlan-name) Vlan name. type: str more...

Notes

Note

  • 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>
          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
              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]>
              auth_pwd: <list or string>
              name: <string>
              priv_proto: <value in [des, aes]>
              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>

Return Values

Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:

  • meta - The result of the request.returned: always type: dict
    • request_url - The full url requested. returned: always type: str sample: /sys/login/user
    • response_code - The status of api request. returned: always type: int sample: 0
    • response_data - The data body of the api response. returned: optional type: list or dict
    • response_message - The descriptive message of the api response. returned: always type: str sample: OK
    • system_information - The information of the target system. returned: always type: dict
  • rc - The status the request. returned: always type: int sample: 0
  • version_check_warning - Warning if the parameters used in the playbook are not supported by the current FortiManager version. returned: if at least one parameter not supported by the current FortiManager version type: list

Status

  • This module is not guaranteed to have a backwards compatible interface.

Authors

  • Xinwei Du (@dux-fortinet)

  • Xing Li (@lix-fortinet)

  • Jie Xue (@JieX19)

  • Link Zheng (@chillancezen)

  • Frank Shen (@fshen01)

  • Hongbin Lu (@fgtdev-hblu)