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
    • 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
      • Synopsis
      • Requirements
      • FortiSwitch Version Compatibility
      • Parameters
      • Examples
      • Return Values
      • Status
      • Authors
    • 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_system_link_monitor – Configure Link Health Monitor in Fortinet’s FortiSwitch
  • View page source

fortiswitch_system_link_monitor – Configure Link Health Monitor 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 system feature and link_monitor 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_system_link_monitor 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
  • system_link_monitor - Configure Link Health Monitor. type: dict
    • addr_mode - Address mode (IPv4 or IPv6). type: str choices: ipv4, ipv6
    • failtime - Number of retry attempts before bringing server down. type: int
    • gateway_ip - Gateway IP used to PING the server. type: str
    • gateway_ip6 - Gateway IPv6 address used to PING the server. type: str
    • http_get - HTTP GET URL string. type: str
    • http_match - Response value from detected server in http-get. type: str
    • interval - Detection interval. type: int
    • name - Link monitor name. type: str required: true
    • packet_size - Packet size of a twamp test session,. type: int
    • password - Twamp controller password in authentication mode. type: str
    • port - Port number to poll. type: int
    • protocol - Protocols used to detect the server. type: list choices: arp, ping, ping6
    • recoverytime - Number of retry attempts before bringing server up. type: int
    • security_mode - Twamp controller security mode. type: str choices: none, authentication
    • server - Server address(es). type: list
      • address - Server address. type: str
    • source_ip - Source IP used in packet to the server. type: str
    • source_ip6 - Source IPv6 address used in packet to the server. type: str
    • srcintf - Interface where the monitor traffic is sent. type: str
    • status - Enable/disable link monitor administrative status. type: str choices: enable, disable
    • timeout - Detect request timeout. type: int
    • update_cascade_interface - Enable/disable update cascade interface. type: str choices: enable, disable
    • update_static_route - Enable/disable update static route. type: str choices: enable, disable

Examples

- name: Configure Link Health Monitor.
  fortinet.fortiswitch.fortiswitch_system_link_monitor:
      state: "present"
      system_link_monitor:
          addr_mode: "ipv4"
          failtime: "5"
          gateway_ip: "<your_own_value>"
          gateway_ip6: "<your_own_value>"
          http_get: "<your_own_value>"
          http_match: "<your_own_value>"
          interval: "1800"
          name: "default_name_10"
          packet_size: "512"
          password: "<your_own_value>"
          port: "32767"
          protocol: "arp"
          recoverytime: "5"
          security_mode: "none"
          server:
              -
                  address: "<your_own_value>"
          source_ip: "<your_own_value>"
          source_ip6: "<your_own_value>"
          srcintf: "<your_own_value> (source system.interface.name)"
          status: "enable"
          timeout: "127"
          update_cascade_interface: "enable"
          update_static_route: "enable"

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.