Ansible Galaxy FortiSwitch Collection

FortiSwitch/Galaxy Version Mapping Guide

  • FortiSwitch Galaxy Versioning

User's Guide

  • Install FortiSwitch Ansible Galaxy
  • Run Your First Playbook
  • Frequently Asked Questions (FAQ)
  • Get Help

modules index

  • Configuration Modules
    • fortiswitch_alertemail_setting – Alertemail setting configuration in Fortinet’s FortiSwitch
    • fortiswitch_gui_console – Dashboard CLI console configuration in Fortinet’s FortiSwitch
    • fortiswitch_log_custom_field – Custom field configuation in Fortinet’s FortiSwitch
    • fortiswitch_log_disk_filter – Filters for local disk logging in Fortinet’s FortiSwitch
    • fortiswitch_log_disk_setting – Settings for local disk logging in Fortinet’s FortiSwitch
    • fortiswitch_log_eventfilter – Log event filter configuration in Fortinet’s FortiSwitch
    • fortiswitch_log_fortianalyzer2_filter – Filters for FortiAnalyzer in Fortinet’s FortiSwitch
    • fortiswitch_log_fortianalyzer2_setting – Setting for FortiAnalyzer in Fortinet’s FortiSwitch
    • fortiswitch_log_fortianalyzer3_filter – Filters for FortiAnalyzer in Fortinet’s FortiSwitch
    • fortiswitch_log_fortianalyzer3_setting – Setting for FortiAnalyzer in Fortinet’s FortiSwitch
    • fortiswitch_log_fortianalyzer_filter – Filters for FortiAnalyzer in Fortinet’s FortiSwitch
    • fortiswitch_log_fortianalyzer_override_filter – Override filters for FortiAnalyzer in Fortinet’s FortiSwitch
    • fortiswitch_log_fortianalyzer_override_setting – Setting for FortiAnalyzer in Fortinet’s FortiSwitch
    • fortiswitch_log_fortianalyzer_setting – Setting for FortiAnalyzer in Fortinet’s FortiSwitch
    • fortiswitch_log_fortiguard_setting – Settings for FortiGuard Analysis Service in Fortinet’s FortiSwitch
    • fortiswitch_log_gui – Logging device to display in GUI in Fortinet’s FortiSwitch
    • fortiswitch_log_memory_filter – Filters for memory buffer in Fortinet’s FortiSwitch
    • fortiswitch_log_memory_global_setting – Global settings for memory log in Fortinet’s FortiSwitch
    • fortiswitch_log_memory_setting – Settings for memory buffer in Fortinet’s FortiSwitch
    • fortiswitch_log_remote_setting – Settings for remote logging in Fortinet’s FortiSwitch
    • fortiswitch_log_syslogd2_filter – Filters for remote system server in Fortinet’s FortiSwitch
    • fortiswitch_log_syslogd2_setting – Settings for remote syslog server in Fortinet’s FortiSwitch
    • fortiswitch_log_syslogd3_filter – Filters for remote system server in Fortinet’s FortiSwitch
    • fortiswitch_log_syslogd3_setting – Settings for remote syslog server in Fortinet’s FortiSwitch
    • fortiswitch_log_syslogd_filter – Filters for remote system server in Fortinet’s FortiSwitch
    • fortiswitch_log_syslogd_override_filter – Override filters for remote system server in Fortinet’s FortiSwitch
    • fortiswitch_log_syslogd_override_setting – Settings for remote syslog server in Fortinet’s FortiSwitch
    • fortiswitch_log_syslogd_setting – Settings for remote syslog server in Fortinet’s FortiSwitch
    • fortiswitch_router_access_list – Access list configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_access_list6 – IPv6 access list configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_aspath_list – AS path list configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_auth_path – Auth-based routing configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_bgp – BGP configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_community_list – Community list configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_gwdetect – Gwdetect in Fortinet’s FortiSwitch
    • fortiswitch_router_isis – ISIS configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_key_chain – Key-chain configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_multicast – Router multicast configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_multicast_flow – Multicast-flow configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_ospf – OSPF configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_ospf6 – Router OSPF6 configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_policy – Policy routing configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_prefix_list – Prefix list configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_prefix_list6 – IPv6 prefix list configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_rip – RIP configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_ripng – router ripng configuratio in Fortinet’s FortiSwitch
    • fortiswitch_router_route_map – Route map configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_setting – Set rib settings in Fortinet’s FortiSwitch
    • fortiswitch_router_static – IPv4 static routes configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_static6 – Ipv6 static routes configuration in Fortinet’s FortiSwitch
    • fortiswitch_router_vrf – VRF configuration in Fortinet’s FortiSwitch
    • fortiswitch_switch_acl_802_1x – 802-1X Radius Dynamic Ingress Policy configuration in Fortinet’s FortiSwitch
    • fortiswitch_switch_acl_egress – Egress Policy configuration in Fortinet’s FortiSwitch
    • fortiswitch_switch_acl_ingress – Ingress Policy configuration in Fortinet’s FortiSwitch
    • fortiswitch_switch_acl_policer – Policer configuration in Fortinet’s FortiSwitch
    • fortiswitch_switch_acl_prelookup – Prelookup Policy configuration in Fortinet’s FortiSwitch
    • fortiswitch_switch_acl_service_custom – Custom service configuration in Fortinet’s FortiSwitch
    • fortiswitch_switch_acl_settings – Configure access-control lists global settings on Switch in Fortinet’s FortiSwitch
    • fortiswitch_switch_auto_isl_port_group – Auto ISL port group in Fortinet’s FortiSwitch
    • fortiswitch_switch_auto_network – Auto network in Fortinet’s FortiSwitch
    • fortiswitch_switch_controller_global – Switch-controller global configuration in Fortinet’s FortiSwitch
    • fortiswitch_switch_domain – Switch forwarding domains in Fortinet’s FortiSwitch
    • fortiswitch_switch_global – Configure global settings in Fortinet’s FortiSwitch
    • fortiswitch_switch_igmp_snooping_globals – Configure igmp-snooping on Switch in Fortinet’s FortiSwitch
    • fortiswitch_switch_interface – Usable interfaces (trunks and ports) in Fortinet’s FortiSwitch
    • fortiswitch_switch_ip_mac_binding – Ip-mac-binding table in Fortinet’s FortiSwitch
    • fortiswitch_switch_lldp_profile – LLDP configuration profiles in Fortinet’s FortiSwitch
    • fortiswitch_switch_lldp_settings – Global LLDP configuration in Fortinet’s FortiSwitch
    • fortiswitch_switch_macsec_profile – MACsec configuration profiles in Fortinet’s FortiSwitch
    • fortiswitch_switch_mirror – Packet mirror in Fortinet’s FortiSwitch
    • fortiswitch_switch_mld_snooping_globals – Configure mld-snooping on Switch in Fortinet’s FortiSwitch
    • fortiswitch_switch_network_monitor_directed – Configuration of the static entries for network monitoring on the switch in Fortinet’s FortiSwitch
    • fortiswitch_switch_network_monitor_settings – Global configuration of network monitoring on the switch in Fortinet’s FortiSwitch
    • fortiswitch_switch_phy_mode – PHY configuration in Fortinet’s FortiSwitch
    • fortiswitch_switch_physical_port – Physical port specific configuration in Fortinet’s FortiSwitch
    • fortiswitch_switch_ptp_policy – PTP policy configuration in Fortinet’s FortiSwitch
    • fortiswitch_switch_ptp_settings – Global PTP configuration in Fortinet’s FortiSwitch
    • fortiswitch_switch_qos_dot1p_map – QOS 802.1p configuration in Fortinet’s FortiSwitch
    • fortiswitch_switch_qos_ip_dscp_map – QOS IP precedence/DSCP configuration in Fortinet’s FortiSwitch
    • fortiswitch_switch_qos_qos_policy – QOS egress policy in Fortinet’s FortiSwitch
    • fortiswitch_switch_quarantine – Configure quarantine devices on the switch in Fortinet’s FortiSwitch
    • fortiswitch_switch_raguard_policy – IPV6 RA Guard policy in Fortinet’s FortiSwitch
    • fortiswitch_switch_security_feature – Switch security feature control nobs in Fortinet’s FortiSwitch
    • fortiswitch_switch_static_mac – Switch static mac address entries in Fortinet’s FortiSwitch
    • fortiswitch_switch_storm_control – Configure excess switch traffic (storm control) in Fortinet’s FortiSwitch
    • fortiswitch_switch_stp_instance – Stp instances in Fortinet’s FortiSwitch
    • fortiswitch_switch_stp_settings – Switch-global stp settings in Fortinet’s FortiSwitch
    • fortiswitch_switch_trunk – Link-aggregation in Fortinet’s FortiSwitch
      • Synopsis
      • Requirements
      • FortiSwitch Version Compatibility
      • Parameters
      • Examples
      • Return Values
      • Status
      • Authors
    • fortiswitch_switch_virtual_wire – Configure virtual wire in Fortinet’s FortiSwitch
    • fortiswitch_switch_vlan – Configure optional per-VLAN settings in Fortinet’s FortiSwitch
    • fortiswitch_switch_vlan_pruning – Vlan Pruning in Fortinet’s FortiSwitch
    • fortiswitch_switch_vlan_tpid – Configure switch global ether-types in Fortinet’s FortiSwitch
    • fortiswitch_system_accprofile – Configure system administrative access group in Fortinet’s FortiSwitch
    • fortiswitch_system_admin – Administrative user configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_alarm – Alarm configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_alertemail – Alert e-mail mail server configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_alias_command – Alias command definitions in Fortinet’s FortiSwitch
    • fortiswitch_system_alias_group – Groups of alias commands in Fortinet’s FortiSwitch
    • fortiswitch_system_arp_table – Configure arp table in Fortinet’s FortiSwitch
    • fortiswitch_system_auto_script – Configure auto script in Fortinet’s FortiSwitch
    • fortiswitch_system_automation_action – Action for automation stitches in Fortinet’s FortiSwitch
    • fortiswitch_system_automation_destination – Automation destinations in Fortinet’s FortiSwitch
    • fortiswitch_system_automation_stitch – Automation stitches in Fortinet’s FortiSwitch
    • fortiswitch_system_automation_trigger – Trigger for automation stitches in Fortinet’s FortiSwitch
    • fortiswitch_system_autoupdate_clientoverride – Configure client override for the FDN in Fortinet’s FortiSwitch
    • fortiswitch_system_autoupdate_override – Configure override FDS server in Fortinet’s FortiSwitch
    • fortiswitch_system_autoupdate_push_update – Configure push updates in Fortinet’s FortiSwitch
    • fortiswitch_system_autoupdate_schedule – Configure update schedule in Fortinet’s FortiSwitch
    • fortiswitch_system_autoupdate_tunneling – Configure web proxy tunneling for the FDN in Fortinet’s FortiSwitch
    • fortiswitch_system_bug_report – Configure bug report in Fortinet’s FortiSwitch
    • fortiswitch_system_central_management – Central management configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_certificate_ca – CA certificate in Fortinet’s FortiSwitch
    • fortiswitch_system_certificate_crl – Certificate Revokation List in Fortinet’s FortiSwitch
    • fortiswitch_system_certificate_local – Local keys and certificates in Fortinet’s FortiSwitch
    • fortiswitch_system_certificate_ocsp – Ocsp configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_certificate_remote – Remote certificate in Fortinet’s FortiSwitch
    • fortiswitch_system_console – Configure console in Fortinet’s FortiSwitch
    • fortiswitch_system_debug – Application and CLI debug values to set at startup and retain over reboot in Fortinet’s FortiSwitch
    • fortiswitch_system_dhcp_server – Configure DHCP servers in Fortinet’s FortiSwitch
    • fortiswitch_system_dns – Configure DNS in Fortinet’s FortiSwitch
    • fortiswitch_system_dns_database – Dns-database in Fortinet’s FortiSwitch
    • fortiswitch_system_dns_server – Dns-server in Fortinet’s FortiSwitch
    • fortiswitch_system_email_server – Email server configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_flan_cloud – FortiLAN cloud manager configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_flow_export – System Flow Export settings in Fortinet’s FortiSwitch
    • fortiswitch_system_fm – Fm in Fortinet’s FortiSwitch
    • fortiswitch_system_fortianalyzer – Setting for FortiAnalyzer in Fortinet’s FortiSwitch
    • fortiswitch_system_fortianalyzer2 – Setting for FortiAnalyzer in Fortinet’s FortiSwitch
    • fortiswitch_system_fortianalyzer3 – Setting for FortiAnalyzer in Fortinet’s FortiSwitch
    • fortiswitch_system_fortiguard – Configure FortiGuard services in Fortinet’s FortiSwitch
    • fortiswitch_system_fortimanager – FortiManagerconfiguration in Fortinet’s FortiSwitch
    • fortiswitch_system_fsw_cloud – FortiSwitch cloud manager configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_global – Configure global range attributes in Fortinet’s FortiSwitch
    • fortiswitch_system_interface – Configure interfaces in Fortinet’s FortiSwitch
    • fortiswitch_system_ipv6_neighbor_cache – Configure IPv6 neighbor cache table in Fortinet’s FortiSwitch
    • fortiswitch_system_link_monitor – Configure Link Health Monitor in Fortinet’s FortiSwitch
    • fortiswitch_system_location – Configure Location table in Fortinet’s FortiSwitch
    • fortiswitch_system_mac_address_table – Mac address table in Fortinet’s FortiSwitch
    • fortiswitch_system_management_tunnel – Management tunnel configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_ntp – Ntp system info configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_object_tag – Object tags in Fortinet’s FortiSwitch
    • fortiswitch_system_password_policy – Config password policy in Fortinet’s FortiSwitch
    • fortiswitch_system_port_pair – Port-pair in Fortinet’s FortiSwitch
    • fortiswitch_system_proxy_arp – Configure proxy-arp in Fortinet’s FortiSwitch
    • fortiswitch_system_ptp_interface_policy – PTP policy configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_ptp_profile – PTP policy configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_resource_limits – Resource limits configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_schedule_group – Schedule group configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_schedule_onetime – onetime schedule configuratio in Fortinet’s FortiSwitch
    • fortiswitch_system_schedule_recurring – recurring schedule configuratio in Fortinet’s FortiSwitch
    • fortiswitch_system_session_ttl – Session ttl configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_settings – Settings in Fortinet’s FortiSwitch
    • fortiswitch_system_sflow – Configure sFlow in Fortinet’s FortiSwitch
    • fortiswitch_system_sniffer_profile – Show packet sniffer configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_snmp_community – SNMP community configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_snmp_sysinfo – SNMP system info configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_snmp_user – SNMP user configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_tos_based_priority – Configure tos based priority table in Fortinet’s FortiSwitch
    • fortiswitch_system_vdom – Virtual domain configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_vdom_dns – Vdom dns configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_vdom_property – Vdom-property configuration in Fortinet’s FortiSwitch
    • fortiswitch_system_vxlan – Configure VXLAN devices in Fortinet’s FortiSwitch
    • fortiswitch_system_web – Configure web attributes in Fortinet’s FortiSwitch
    • fortiswitch_system_zone – Zone configuration in Fortinet’s FortiSwitch
    • fortiswitch_user_group – User group configuration in Fortinet’s FortiSwitch
    • fortiswitch_user_ldap – LDAP server entry configuration in Fortinet’s FortiSwitch
    • fortiswitch_user_local – Local user configuration in Fortinet’s FortiSwitch
    • fortiswitch_user_peer – config peer use in Fortinet’s FortiSwitch
    • fortiswitch_user_peergrp – config peer’s user grou in Fortinet’s FortiSwitch
    • fortiswitch_user_radius – RADIUS server entry configuration in Fortinet’s FortiSwitch
    • fortiswitch_user_setting – User authentication setting in Fortinet’s FortiSwitch
    • fortiswitch_user_tacacsplus – TACACS+ server entry configuration in Fortinet’s FortiSwitch
  • Facts Gathering Modules
  • Export playbooks
  • Execute Modules
  • Generic Modules

Appendices

  • Release Notes
Ansible Galaxy FortiSwitch Collection
  • Configuration Modules
  • fortiswitch_switch_trunk – Link-aggregation in Fortinet’s FortiSwitch
  • View page source

fortiswitch_switch_trunk – Link-aggregation in Fortinet’s FortiSwitch

Added in version 1.0.0.

  • Synopsis

  • Requirements

  • FortiSwitch Version Compatibility

  • Parameters

  • Examples

  • Return Values

  • Status

  • Authors

Synopsis

  • This module is able to configure a FortiSwitch device by allowing the user to set and modify switch feature and trunk category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v7.0.0

Requirements

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

  • ansible>=2.16

FortiSwitch Version Compatibility


Supported Version Ranges
fortiswitch_switch_trunk v7.0.0 -> 7.4.3

Parameters

  • enable_log - Enable/Disable logging for task. type: bool required: false default: False
  • member_path - Member attribute path to operate on. type: str
  • member_state - Add or delete a member under specified attribute path. type: str choices: present, absent
  • state - Indicates whether to create or remove the object. type: str required: true choices: present, absent
  • switch_trunk - Link-aggregation. type: dict
    • aggregator_mode - LACP Member Select Mode. type: str choices: bandwidth, count
    • auto_isl - Trunk with auto-isl. type: int
    • bundle - Enable bundle. type: str choices: enable, disable
    • description - Description. type: str
    • fallback_port - LACP fallback port. type: str
    • fortilink - FortiLink trunk. type: int
    • hb_dst_ip - Destination IP address of heartbeat packet. type: str
    • hb_dst_udp_port - Destination UDP port of heartbeat packet. type: int
    • hb_in_vlan - Receive VLAN ID in heartbeat packet. type: int
    • hb_out_vlan - Transmit VLAN ID in heartbeat packet. type: int
    • hb_src_ip - Source IP address of heartbeat packet. type: str
    • hb_src_udp_port - Source UDP port of heartbeat packet. type: int
    • hb_verify - Enable/disable heartbeat packet strict validation. type: str choices: enable, disable
    • isl_fortilink - ISL fortiLink trunk. type: int
    • lacp_speed - LACP speed. type: str choices: slow, fast
    • max_bundle - Maximum size of bundle. type: int
    • max_miss_heartbeats - Maximum tolerant missed heartbeats. type: int
    • mclag - Multi Chassis LAG. type: str choices: enable, disable
    • mclag_icl - MCLAG inter-chassis-link. type: str choices: enable, disable
    • mclag_mac_address - MCLAG MAC address. type: str
    • member_withdrawal_behavior - Port behaviors after it withdraws because of loss of control packets. type: str choices: forward, block
    • members - Aggregated interfaces. type: list
      • member_name - Interface name. type: str
    • min_bundle - Minimum size of bundle. type: int
    • mode - Link Aggreation mode. type: str choices: static, lacp-passive, lacp-active, fortinet-trunk
    • name - Trunk name. type: str required: true
    • port_extension - Port extension enable. type: str choices: enable, disable
    • port_extension_trigger - Number of failed port to trigger the whole trunk down. type: int
    • 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
    • restricted - Restricted ISL ICL trunk. type: int
    • static_isl - Static ISL. type: str choices: enable, disable
    • static_isl_auto_vlan - User ISL auto VLAN. type: str choices: enable, disable
    • trunk_id - Internal id. type: int

Examples

- name: Link-aggregation.
  fortinet.fortiswitch.fortiswitch_switch_trunk:
      state: "present"
      switch_trunk:
          aggregator_mode: "bandwidth"
          auto_isl: "4"
          bundle: "enable"
          description: "<your_own_value>"
          fallback_port: "<your_own_value>"
          fortilink: "8"
          hb_dst_ip: "<your_own_value>"
          hb_dst_udp_port: "10"
          hb_in_vlan: "11"
          hb_out_vlan: "12"
          hb_src_ip: "<your_own_value>"
          hb_src_udp_port: "14"
          hb_verify: "enable"
          isl_fortilink: "16"
          lacp_speed: "slow"
          max_bundle: "18"
          max_miss_heartbeats: "19"
          mclag: "enable"
          mclag_icl: "enable"
          mclag_mac_address: "<your_own_value>"
          member_withdrawal_behavior: "forward"
          members:
              -
                  member_name: "<your_own_value> (source switch.physical-port.name)"
          min_bundle: "26"
          mode: "static"
          name: "default_name_28"
          port_extension: "enable"
          port_extension_trigger: "30"
          port_selection_criteria: "src-mac"
          restricted: "0"
          static_isl: "enable"
          static_isl_auto_vlan: "enable"
          trunk_id: "35"

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:

  • build - Build number of the fortiSwitch image returned: always type: str sample: 1547
  • http_method - Last method used to provision the content into FortiSwitch returned: always type: str sample: PUT
  • http_status - Last result given by FortiSwitch on last operation applied returned: always type: str sample: 200
  • mkey - Master key (id) used in the last call to FortiSwitch returned: success type: str sample: id
  • name - Name of the table used to fulfill the request returned: always type: str sample: urlfilter
  • path - Path of the table used to fulfill the request returned: always type: str sample: webfilter
  • serial - Serial number of the unit returned: always type: str sample: FS1D243Z13000122
  • status - Indication of the operation's result returned: always type: str sample: success
  • version - Version of the FortiSwitch returned: always type: str sample: v7.0.0

Status

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

Authors

  • Link Zheng (@chillancezen)

  • Jie Xue (@JieX19)

  • Hongbin Lu (@fgtdev-hblu)

  • Frank Shen (@frankshen01)

  • Miguel Angel Munoz (@mamunozgonzalez)

Hint

If you notice any issues in this documentation, feel free to create a pull request to improve it.

Previous Next

© Copyright 2020-2021, Fortinet.

Built with Sphinx using a theme provided by Read the Docs.