fortios_system_interface – Configure interfaces in Fortinet’s FortiOS and FortiGate.

New in version 2.8.

Synopsis

  • This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify system feature and interface category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0

Requirements

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

  • ansible>=2.9.0

Parameters

  • access_token - Token-based authentication. Generated from GUI of Fortigate. type: str required: False
  • vdom - Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit. type: str default: root
  • state - Indicates whether to create or remove the object. This attribute was present already in previous version in a deeper level. It has been moved out to this outer level. type: str required: False choices: present, absent
  • system_interface - Configure interfaces. type: dict
    • state - B(Deprecated) type: str required: False choices: present, absent
    • ac_name - PPPoE server name. type: str
    • aggregate - Aggregate interface. type: str
    • algorithm - Frame distribution algorithm. type: str choices: L2, L3, L4
    • alias - Alias will be displayed with the interface name to make it easier to distinguish. type: str
    • allowaccess - Permitted types of management access to this interface. type: list choices: ping, https, ssh, snmp, http, telnet, fgfm, radius-acct, probe-response, capwap, ftm
    • ap_discover - Enable/disable automatic registration of unknown FortiAP devices. type: str choices: enable, disable
    • arpforward - Enable/disable ARP forwarding. type: str choices: enable, disable
    • auth_type - PPP authentication type to use. type: str choices: auto, pap, chap, mschapv1, mschapv2
    • auto_auth_extension_device - Enable/disable automatic authorization of dedicated Fortinet extension device on this interface. type: str choices: enable, disable
    • bfd - Bidirectional Forwarding Detection (BFD) settings. type: str choices: global, enable, disable
    • bfd_desired_min_tx - BFD desired minimal transmit interval. type: int
    • bfd_detect_mult - BFD detection multiplier. type: int
    • bfd_required_min_rx - BFD required minimal receive interval. type: int
    • broadcast_forticlient_discovery - Enable/disable broadcasting FortiClient discovery messages. type: str choices: enable, disable
    • broadcast_forward - Enable/disable broadcast forwarding. type: str choices: enable, disable
    • captive_portal - Enable/disable captive portal. type: int
    • cli_conn_status - CLI connection status. type: int
    • color - Color of icon on the GUI. type: int
    • dedicated_to - Configure interface for single purpose. type: str choices: none, management
    • defaultgw - Enable to get the gateway IP from the DHCP or PPPoE server. type: str choices: enable, disable
    • description - Description. type: str
    • detected_peer_mtu - MTU of detected peer (0 - 4294967295). type: int
    • detectprotocol - Protocols used to detect the server. type: str choices: ping, tcp-echo, udp-echo
    • detectserver - Gateway"s ping server for this IP. type: str
    • device_access_list - Device access list. type: str
    • device_identification - Enable/disable passively gathering of device identity information about the devices on the network connected to this interface. type: str choices: enable, disable
    • device_identification_active_scan - Enable/disable active gathering of device identity information about the devices on the network connected to this interface. type: str choices: enable, disable
    • device_netscan - Enable/disable inclusion of devices detected on this interface in network vulnerability scans. type: str choices: disable, enable
    • device_user_identification - Enable/disable passive gathering of user identity information about users on this interface. type: str choices: enable, disable
    • devindex - Device Index. type: int
    • dhcp_client_identifier - DHCP client identifier. type: str
    • dhcp_relay_agent_option - Enable/disable DHCP relay agent option. type: str choices: enable, disable
    • dhcp_relay_ip - DHCP relay IP address. type: str
    • dhcp_relay_service - Enable/disable allowing this interface to act as a DHCP relay. type: str choices: disable, enable
    • dhcp_relay_type - DHCP relay type (regular or IPsec). type: str choices: regular, ipsec
    • dhcp_renew_time - DHCP renew time in seconds (300-604800), 0 means use the renew time provided by the server. type: int
    • disc_retry_timeout - Time in seconds to wait before retrying to start a PPPoE discovery, 0 means no timeout. type: int
    • disconnect_threshold - Time in milliseconds to wait before sending a notification that this interface is down or disconnected. type: int
    • distance - Distance for routes learned through PPPoE or DHCP, lower distance indicates preferred route. type: int
    • dns_server_override - Enable/disable use DNS acquired by DHCP or PPPoE. type: str choices: enable, disable
    • drop_fragment - Enable/disable drop fragment packets. type: str choices: enable, disable
    • drop_overlapped_fragment - Enable/disable drop overlapped fragment packets. type: str choices: enable, disable
    • egress_shaping_profile - Outgoing traffic shaping profile. type: str
    • endpoint_compliance - Enable/disable endpoint compliance enforcement. type: str choices: enable, disable
    • estimated_downstream_bandwidth - Estimated maximum downstream bandwidth (kbps). Used to estimate link utilization. type: int
    • estimated_upstream_bandwidth - Estimated maximum upstream bandwidth (kbps). Used to estimate link utilization. type: int
    • explicit_ftp_proxy - Enable/disable the explicit FTP proxy on this interface. type: str choices: enable, disable
    • explicit_web_proxy - Enable/disable the explicit web proxy on this interface. type: str choices: enable, disable
    • external - Enable/disable identifying the interface as an external interface (which usually means it"s connected to the Internet). type: str choices: enable, disable
    • fail_action_on_extender - Action on extender when interface fail . type: str choices: soft-restart, hard-restart, reboot
    • fail_alert_interfaces - Names of the FortiGate interfaces from which the link failure alert is sent for this interface. type: list
      • name - Names of the physical interfaces belonging to the aggregate or redundant interface. Source system.interface.name. type: str required: True
    • fail_alert_method - Select link-failed-signal or link-down method to alert about a failed link. type: str choices: link-failed-signal, link-down
    • fail_detect - Enable/disable fail detection features for this interface. type: str choices: enable, disable
    • fail_detect_option - Options for detecting that this interface has failed. type: str choices: detectserver, link-down
    • fortiheartbeat - Enable/disable FortiHeartBeat (FortiTelemetry on GUI). type: str choices: enable, disable
    • fortilink - Enable FortiLink to dedicate this interface to manage other Fortinet devices. type: str choices: enable, disable
    • fortilink_backup_link - fortilink split interface backup link. type: int
    • fortilink_split_interface - Enable/disable FortiLink split interface to connect member link to different FortiSwitch in stack for uplink redundancy (maximum 2 interfaces in the "members" command). type: str choices: enable, disable
    • fortilink_stacking - Enable/disable FortiLink switch-stacking on this interface. type: str choices: enable, disable
    • forward_domain - Transparent mode forward domain. type: int
    • gwdetect - Enable/disable detect gateway alive for first. type: str choices: enable, disable
    • ha_priority - HA election priority for the PING server. type: int
    • icmp_redirect - Enable/disable ICMP redirect. type: str choices: enable, disable
    • ident_accept - Enable/disable authentication for this interface. type: str choices: enable, disable
    • idle_timeout - PPPoE auto disconnect after idle timeout seconds, 0 means no timeout. type: int
    • inbandwidth - Bandwidth limit for incoming traffic (0 - 16776000 kbps), 0 means unlimited. type: int
    • ingress_spillover_threshold - Ingress Spillover threshold (0 - 16776000 kbps). type: int
    • interface - Interface name. Source system.interface.name. type: str
    • internal - Implicitly created. type: int
    • ip - Interface IPv4 address and subnet mask, syntax: X.X.X.X/24. type: str
    • ipmac - Enable/disable IP/MAC binding. type: str choices: enable, disable
    • ips_sniffer_mode - Enable/disable the use of this interface as a one-armed sniffer. type: str choices: enable, disable
    • ipunnumbered - Unnumbered IP used for PPPoE interfaces for which no unique local address is provided. type: str
    • ipv6 - IPv6 of interface. type: dict
      • autoconf - Enable/disable address auto config. type: str choices: enable, disable
      • dhcp6_client_options - DHCPv6 client options. type: str choices: rapid, iapd, iana
      • dhcp6_information_request - Enable/disable DHCPv6 information request. type: str choices: enable, disable
      • dhcp6_prefix_delegation - Enable/disable DHCPv6 prefix delegation. type: str choices: enable, disable
      • dhcp6_prefix_hint - DHCPv6 prefix that will be used as a hint to the upstream DHCPv6 server. type: str
      • dhcp6_prefix_hint_plt - DHCPv6 prefix hint preferred life time (sec), 0 means unlimited lease time. type: int
      • dhcp6_prefix_hint_vlt - DHCPv6 prefix hint valid life time (sec). type: int
      • dhcp6_relay_ip - DHCPv6 relay IP address. type: str
      • dhcp6_relay_service - Enable/disable DHCPv6 relay. type: str choices: disable, enable
      • dhcp6_relay_type - DHCPv6 relay type. type: str choices: regular
      • ip6_address - Primary IPv6 address prefix, syntax: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/xxx type: str
      • ip6_allowaccess - Allow management access to the interface. type: list choices: ping, https, ssh, snmp, http, telnet, fgfm, capwap
      • ip6_default_life - Default life (sec). type: int
      • ip6_delegated_prefix_list - Advertised IPv6 delegated prefix list. type: list
        • autonomous_flag - Enable/disable the autonomous flag. type: str choices: enable, disable
        • onlink_flag - Enable/disable the onlink flag. type: str choices: enable, disable
        • prefix_id - Prefix ID. type: int
        • rdnss - Recursive DNS server option. type: str
        • rdnss_service - Recursive DNS service option. type: str choices: delegated, default, specify
        • subnet - Add subnet ID to routing prefix. type: str
        • upstream_interface - Name of the interface that provides delegated information. Source system.interface.name. type: str
      • ip6_dns_server_override - Enable/disable using the DNS server acquired by DHCP. type: str choices: enable, disable
      • ip6_extra_addr - Extra IPv6 address prefixes of interface. type: list
        • prefix - IPv6 address prefix. type: str required: True
      • ip6_hop_limit - Hop limit (0 means unspecified). type: int
      • ip6_link_mtu - IPv6 link MTU. type: int
      • ip6_manage_flag - Enable/disable the managed flag. type: str choices: enable, disable
      • ip6_max_interval - IPv6 maximum interval (4 to 1800 sec). type: int
      • ip6_min_interval - IPv6 minimum interval (3 to 1350 sec). type: int
      • ip6_mode - Addressing mode (static, DHCP, delegated). type: str choices: static, dhcp, pppoe, delegated
      • ip6_other_flag - Enable/disable the other IPv6 flag. type: str choices: enable, disable
      • ip6_prefix_list - Advertised prefix list. type: list
        • autonomous_flag - Enable/disable the autonomous flag. type: str choices: enable, disable
        • dnssl - DNS search list option. type: list
          • domain - Domain name. type: str required: True
        • onlink_flag - Enable/disable the onlink flag. type: str choices: enable, disable
        • preferred_life_time - Preferred life time (sec). type: int
        • prefix - IPv6 prefix. type: str required: True
        • rdnss - Recursive DNS server option. type: str
        • valid_life_time - Valid life time (sec). type: int
      • ip6_reachable_time - IPv6 reachable time (milliseconds; 0 means unspecified). type: int
      • ip6_retrans_time - IPv6 retransmit time (milliseconds; 0 means unspecified). type: int
      • ip6_send_adv - Enable/disable sending advertisements about the interface. type: str choices: enable, disable
      • ip6_subnet - Subnet to routing prefix, syntax: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/xxx type: str
      • ip6_upstream_interface - Interface name providing delegated information. Source system.interface.name. type: str
      • nd_cert - Neighbor discovery certificate. Source certificate.local.name. type: str
      • nd_cga_modifier - Neighbor discovery CGA modifier. type: str
      • nd_mode - Neighbor discovery mode. type: str choices: basic, SEND-compatible
      • nd_security_level - Neighbor discovery security level (0 - 7; 0 = least secure). type: int
      • nd_timestamp_delta - Neighbor discovery timestamp delta value (1 - 3600 sec; ). type: int
      • nd_timestamp_fuzz - Neighbor discovery timestamp fuzz factor (1 - 60 sec; ). type: int
      • vrip6_link_local - Link-local IPv6 address of virtual router. type: str
      • vrrp_virtual_mac6 - Enable/disable virtual MAC for VRRP. type: str choices: enable, disable
      • vrrp6 - IPv6 VRRP configuration. type: list
        • accept_mode - Enable/disable accept mode. type: str choices: enable, disable
        • adv_interval - Advertisement interval (1 - 255 seconds). type: int
        • preempt - Enable/disable preempt mode. type: str choices: enable, disable
        • priority - Priority of the virtual router (1 - 255). type: int
        • start_time - Startup time (1 - 255 seconds). type: int
        • status - Enable/disable VRRP. type: str choices: enable, disable
        • vrdst6 - Monitor the route to this destination. type: str
        • vrgrp - VRRP group ID (1 - 65535). type: int
        • vrid - Virtual router identifier (1 - 255). type: int required: True
        • vrip6 - IPv6 address of the virtual router. type: str
    • l2forward - Enable/disable l2 forwarding. type: str choices: enable, disable
    • lacp_ha_slave - LACP HA slave. type: str choices: enable, disable
    • lacp_mode - LACP mode. type: str choices: static, passive, active
    • lacp_speed - How often the interface sends LACP messages. type: str choices: slow, fast
    • lcp_echo_interval - Time in seconds between PPPoE Link Control Protocol (LCP) echo requests. type: int
    • lcp_max_echo_fails - Maximum missed LCP echo messages before disconnect. type: int
    • link_up_delay - Number of milliseconds to wait before considering a link is up. type: int
    • lldp_transmission - Enable/disable Link Layer Discovery Protocol (LLDP) transmission. type: str choices: enable, disable, vdom
    • macaddr - Change the interface"s MAC address. type: str
    • managed_device - Available when FortiLink is enabled, used for managed devices through FortiLink interface. type: list
      • name - Managed dev identifier. type: str required: True
    • management_ip - High Availability in-band management IP address of this interface. type: str
    • member - Physical interfaces that belong to the aggregate or redundant interface. type: list
      • interface_name - Physical interface name. Source system.interface.name. type: str
    • min_links - Minimum number of aggregated ports that must be up. type: int
    • min_links_down - Action to take when less than the configured minimum number of links are active. type: str choices: operational, administrative
    • mode - Addressing mode (static, DHCP, PPPoE). type: str choices: static, dhcp, pppoe
    • mtu - MTU value for this interface. type: int
    • mtu_override - Enable to set a custom MTU for this interface. type: str choices: enable, disable
    • name - Name. type: str required: True
    • ndiscforward - Enable/disable NDISC forwarding. type: str choices: enable, disable
    • netbios_forward - Enable/disable NETBIOS forwarding. type: str choices: disable, enable
    • netflow_sampler - Enable/disable NetFlow on this interface and set the data that NetFlow collects (rx, tx, or both). type: str choices: disable, tx, rx, both
    • outbandwidth - Bandwidth limit for outgoing traffic (0 - 16776000 kbps). type: int
    • padt_retry_timeout - PPPoE Active Discovery Terminate (PADT) used to terminate sessions after an idle time. type: int
    • password - PPPoE account"s password. type: str
    • ping_serv_status - PING server status. type: int
    • polling_interval - sFlow polling interval (1 - 255 sec). type: int
    • pppoe_unnumbered_negotiate - Enable/disable PPPoE unnumbered negotiation. type: str choices: enable, disable
    • pptp_auth_type - PPTP authentication type. type: str choices: auto, pap, chap, mschapv1, mschapv2
    • pptp_client - Enable/disable PPTP client. type: str choices: enable, disable
    • pptp_password - PPTP password. type: str
    • pptp_server_ip - PPTP server IP address. type: str
    • pptp_timeout - Idle timer in minutes (0 for disabled). type: int
    • pptp_user - PPTP user name. type: str
    • preserve_session_route - Enable/disable preservation of session route when dirty. type: str choices: enable, disable
    • priority - Priority of learned routes. type: int
    • priority_override - Enable/disable fail back to higher priority port once recovered. type: str choices: enable, disable
    • proxy_captive_portal - Enable/disable proxy captive portal on this interface. type: str choices: enable, disable
    • redundant_interface - Redundant interface. type: str
    • remote_ip - Remote IP address of tunnel. type: str
    • replacemsg_override_group - Replacement message override group. type: str
    • role - Interface role. type: str choices: lan, wan, dmz, undefined
    • sample_direction - Data that NetFlow collects (rx, tx, or both). type: str choices: tx, rx, both
    • sample_rate - sFlow sample rate (10 - 99999). type: int
    • scan_botnet_connections - Enable monitoring or blocking connections to Botnet servers through this interface. type: str choices: disable, block, monitor
    • secondary_IP - Enable/disable adding a secondary IP to this interface. type: str choices: enable, disable
    • secondaryip - Second IP address of interface. type: list
      • allowaccess - Management access settings for the secondary IP address. type: str choices: ping, https, ssh, snmp, http, telnet, fgfm, radius-acct, probe-response, capwap, ftm
      • detectprotocol - Protocols used to detect the server. type: str choices: ping, tcp-echo, udp-echo
      • detectserver - Gateway"s ping server for this IP. type: str
      • gwdetect - Enable/disable detect gateway alive for first. type: str choices: enable, disable
      • ha_priority - HA election priority for the PING server. type: int
      • id - ID. type: int required: True
      • ip - Secondary IP address of the interface. type: str
      • ping_serv_status - PING server status. type: int
    • security_exempt_list - Name of security-exempt-list. type: str
    • security_external_logout - URL of external authentication logout server. type: str
    • security_external_web - URL of external authentication web server. type: str
    • security_groups - User groups that can authenticate with the captive portal. type: list
      • name - Names of user groups that can authenticate with the captive portal. type: str required: True
    • security_mac_auth_bypass - Enable/disable MAC authentication bypass. type: str choices: enable, disable
    • security_mode - Turn on captive portal authentication for this interface. type: str choices: none, captive-portal, 802.1X
    • security_redirect_url - URL redirection after disclaimer/authentication. type: str
    • service_name - PPPoE service name. type: str
    • sflow_sampler - Enable/disable sFlow on this interface. type: str choices: enable, disable
    • snmp_index - Permanent SNMP Index of the interface. type: int
    • speed - Interface speed. The default setting and the options available depend on the interface hardware. type: str choices: auto, 10full, 10half, 100full, 100half, 1000full, 1000half, 1000auto
    • spillover_threshold - Egress Spillover threshold (0 - 16776000 kbps), 0 means unlimited. type: int
    • src_check - Enable/disable source IP check. type: str choices: enable, disable
    • status - Bring the interface up or shut the interface down. type: str choices: up, down
    • stpforward - Enable/disable STP forwarding. type: str choices: enable, disable
    • stpforward_mode - Configure STP forwarding mode. type: str choices: rpl-all-ext-id, rpl-bridge-ext-id, rpl-nothing
    • subst - Enable to always send packets from this interface to a destination MAC address. type: str choices: enable, disable
    • substitute_dst_mac - Destination MAC address that all packets are sent to from this interface. type: str
    • switch - Contained in switch. type: str
    • switch_controller_access_vlan - Block FortiSwitch port-to-port traffic. type: str choices: enable, disable
    • switch_controller_arp_inspection - Enable/disable FortiSwitch ARP inspection. type: str choices: enable, disable
    • switch_controller_dhcp_snooping - Switch controller DHCP snooping. type: str choices: enable, disable
    • switch_controller_dhcp_snooping_option82 - Switch controller DHCP snooping option82. type: str choices: enable, disable
    • switch_controller_dhcp_snooping_verify_mac - Switch controller DHCP snooping verify MAC. type: str choices: enable, disable
    • switch_controller_igmp_snooping - Switch controller IGMP snooping. type: str choices: enable, disable
    • switch_controller_learning_limit - Limit the number of dynamic MAC addresses on this VLAN (1 - 128, 0 = no limit, default). type: int
    • tagging - Config object tagging. type: list
      • category - Tag category. Source system.object-tagging.category. type: str
      • name - Tagging entry name. type: str required: True
      • tags - Tags. type: list
        • name - Tag name. Source system.object-tagging.tags.name. type: str required: True
    • tcp_mss - TCP maximum segment size. 0 means do not change segment size. type: int
    • trust_ip_1 - Trusted host for dedicated management traffic (0.0.0.0/24 for all hosts). type: str
    • trust_ip_2 - Trusted host for dedicated management traffic (0.0.0.0/24 for all hosts). type: str
    • trust_ip_3 - Trusted host for dedicated management traffic (0.0.0.0/24 for all hosts). type: str
    • trust_ip6_1 - Trusted IPv6 host for dedicated management traffic (::/0 for all hosts). type: str
    • trust_ip6_2 - Trusted IPv6 host for dedicated management traffic (::/0 for all hosts). type: str
    • trust_ip6_3 - Trusted IPv6 host for dedicated management traffic (::/0 for all hosts). type: str
    • type - Interface type. type: str choices: physical, vlan, aggregate, redundant, tunnel, vdom-link, loopback, switch, hard-switch, vap-switch, wl-mesh, fext-wan, vxlan, hdlc, switch-vlan
    • username - Username of the PPPoE account, provided by your ISP. type: str
    • vdom - Interface is in this virtual domain (VDOM). Source system.vdom.name. type: str
    • vindex - Switch control interface VLAN ID. type: int
    • vlanforward - Enable/disable traffic forwarding between VLANs on this interface. type: str choices: enable, disable
    • vlanid - VLAN ID (1 - 4094). type: int
    • vrf - Virtual Routing Forwarding ID. type: int
    • vrrp - VRRP configuration. type: list
      • accept_mode - Enable/disable accept mode. type: str choices: enable, disable
      • adv_interval - Advertisement interval (1 - 255 seconds). type: int
      • preempt - Enable/disable preempt mode. type: str choices: enable, disable
      • priority - Priority of the virtual router (1 - 255). type: int
      • proxy_arp - VRRP Proxy ARP configuration. type: list
        • id - ID. type: int required: True
        • ip - Set IP addresses of proxy ARP. type: str
      • start_time - Startup time (1 - 255 seconds). type: int
      • status - Enable/disable this VRRP configuration. type: str choices: enable, disable
      • version - VRRP version. type: str choices: 2, 3
      • vrdst - Monitor the route to this destination. type: str
      • vrdst_priority - Priority of the virtual router when the virtual router destination becomes unreachable (0 - 254). type: int
      • vrgrp - VRRP group ID (1 - 65535). type: int
      • vrid - Virtual router identifier (1 - 255). type: int required: True
      • vrip - IP address of the virtual router. type: str
    • vrrp_virtual_mac - Enable/disable use of virtual MAC for VRRP. type: str choices: enable, disable
    • wccp - Enable/disable WCCP on this interface. Used for encapsulated WCCP communication between WCCP clients and servers. type: str choices: enable, disable
    • weight - Default weight for static routes (if route has no weight configured). type: int
    • wins_ip - WINS server IP. type: str

Notes

Note

  • Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks

Examples

- hosts: fortigates
  collections:
    - fortinet.fortios
  connection: httpapi
  vars:
   vdom: "root"
   ansible_httpapi_use_ssl: yes
   ansible_httpapi_validate_certs: no
   ansible_httpapi_port: 443
  tasks:
  - name: Configure interfaces.
    fortios_system_interface:
      vdom:  "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      system_interface:
        ac_name: "<your_own_value>"
        aggregate: "<your_own_value>"
        algorithm: "L2"
        alias: "<your_own_value>"
        allowaccess: "ping"
        ap_discover: "enable"
        arpforward: "enable"
        auth_type: "auto"
        auto_auth_extension_device: "enable"
        bfd: "global"
        bfd_desired_min_tx: "13"
        bfd_detect_mult: "14"
        bfd_required_min_rx: "15"
        broadcast_forticlient_discovery: "enable"
        broadcast_forward: "enable"
        captive_portal: "18"
        cli_conn_status: "19"
        color: "20"
        dedicated_to: "none"
        defaultgw: "enable"
        description: "<your_own_value>"
        detected_peer_mtu: "24"
        detectprotocol: "ping"
        detectserver: "<your_own_value>"
        device_access_list: "<your_own_value>"
        device_identification: "enable"
        device_identification_active_scan: "enable"
        device_netscan: "disable"
        device_user_identification: "enable"
        devindex: "32"
        dhcp_client_identifier:  "myId_33"
        dhcp_relay_agent_option: "enable"
        dhcp_relay_ip: "<your_own_value>"
        dhcp_relay_service: "disable"
        dhcp_relay_type: "regular"
        dhcp_renew_time: "38"
        disc_retry_timeout: "39"
        disconnect_threshold: "40"
        distance: "41"
        dns_server_override: "enable"
        drop_fragment: "enable"
        drop_overlapped_fragment: "enable"
        egress_shaping_profile: "<your_own_value>"
        endpoint_compliance: "enable"
        estimated_downstream_bandwidth: "47"
        estimated_upstream_bandwidth: "48"
        explicit_ftp_proxy: "enable"
        explicit_web_proxy: "enable"
        external: "enable"
        fail_action_on_extender: "soft-restart"
        fail_alert_interfaces:
         -
            name: "default_name_54 (source system.interface.name)"
        fail_alert_method: "link-failed-signal"
        fail_detect: "enable"
        fail_detect_option: "detectserver"
        fortiheartbeat: "enable"
        fortilink: "enable"
        fortilink_backup_link: "60"
        fortilink_split_interface: "enable"
        fortilink_stacking: "enable"
        forward_domain: "63"
        gwdetect: "enable"
        ha_priority: "65"
        icmp_redirect: "enable"
        ident_accept: "enable"
        idle_timeout: "68"
        inbandwidth: "69"
        ingress_spillover_threshold: "70"
        interface: "<your_own_value> (source system.interface.name)"
        internal: "72"
        ip: "<your_own_value>"
        ipmac: "enable"
        ips_sniffer_mode: "enable"
        ipunnumbered: "<your_own_value>"
        ipv6:
            autoconf: "enable"
            dhcp6_client_options: "rapid"
            dhcp6_information_request: "enable"
            dhcp6_prefix_delegation: "enable"
            dhcp6_prefix_hint: "<your_own_value>"
            dhcp6_prefix_hint_plt: "83"
            dhcp6_prefix_hint_vlt: "84"
            dhcp6_relay_ip: "<your_own_value>"
            dhcp6_relay_service: "disable"
            dhcp6_relay_type: "regular"
            ip6_address: "<your_own_value>"
            ip6_allowaccess: "ping"
            ip6_default_life: "90"
            ip6_delegated_prefix_list:
             -
                autonomous_flag: "enable"
                onlink_flag: "enable"
                prefix_id: "94"
                rdnss: "<your_own_value>"
                rdnss_service: "delegated"
                subnet: "<your_own_value>"
                upstream_interface: "<your_own_value> (source system.interface.name)"
            ip6_dns_server_override: "enable"
            ip6_extra_addr:
             -
                prefix: "<your_own_value>"
            ip6_hop_limit: "102"
            ip6_link_mtu: "103"
            ip6_manage_flag: "enable"
            ip6_max_interval: "105"
            ip6_min_interval: "106"
            ip6_mode: "static"
            ip6_other_flag: "enable"
            ip6_prefix_list:
             -
                autonomous_flag: "enable"
                dnssl:
                 -
                    domain: "<your_own_value>"
                onlink_flag: "enable"
                preferred_life_time: "114"
                prefix: "<your_own_value>"
                rdnss: "<your_own_value>"
                valid_life_time: "117"
            ip6_reachable_time: "118"
            ip6_retrans_time: "119"
            ip6_send_adv: "enable"
            ip6_subnet: "<your_own_value>"
            ip6_upstream_interface: "<your_own_value> (source system.interface.name)"
            nd_cert: "<your_own_value> (source certificate.local.name)"
            nd_cga_modifier: "<your_own_value>"
            nd_mode: "basic"
            nd_security_level: "126"
            nd_timestamp_delta: "127"
            nd_timestamp_fuzz: "128"
            vrip6_link_local: "<your_own_value>"
            vrrp_virtual_mac6: "enable"
            vrrp6:
             -
                accept_mode: "enable"
                adv_interval: "133"
                preempt: "enable"
                priority: "135"
                start_time: "136"
                status: "enable"
                vrdst6: "<your_own_value>"
                vrgrp: "139"
                vrid: "140"
                vrip6: "<your_own_value>"
        l2forward: "enable"
        lacp_ha_slave: "enable"
        lacp_mode: "static"
        lacp_speed: "slow"
        lcp_echo_interval: "146"
        lcp_max_echo_fails: "147"
        link_up_delay: "148"
        lldp_transmission: "enable"
        macaddr: "<your_own_value>"
        managed_device:
         -
            name: "default_name_152"
        management_ip: "<your_own_value>"
        member:
         -
            interface_name: "<your_own_value> (source system.interface.name)"
        min_links: "156"
        min_links_down: "operational"
        mode: "static"
        mtu: "159"
        mtu_override: "enable"
        name: "default_name_161"
        ndiscforward: "enable"
        netbios_forward: "disable"
        netflow_sampler: "disable"
        outbandwidth: "165"
        padt_retry_timeout: "166"
        password: "<your_own_value>"
        ping_serv_status: "168"
        polling_interval: "169"
        pppoe_unnumbered_negotiate: "enable"
        pptp_auth_type: "auto"
        pptp_client: "enable"
        pptp_password: "<your_own_value>"
        pptp_server_ip: "<your_own_value>"
        pptp_timeout: "175"
        pptp_user: "<your_own_value>"
        preserve_session_route: "enable"
        priority: "178"
        priority_override: "enable"
        proxy_captive_portal: "enable"
        redundant_interface: "<your_own_value>"
        remote_ip: "<your_own_value>"
        replacemsg_override_group: "<your_own_value>"
        role: "lan"
        sample_direction: "tx"
        sample_rate: "186"
        scan_botnet_connections: "disable"
        secondary_IP: "enable"
        secondaryip:
         -
            allowaccess: "ping"
            detectprotocol: "ping"
            detectserver: "<your_own_value>"
            gwdetect: "enable"
            ha_priority: "194"
            id:  "195"
            ip: "<your_own_value>"
            ping_serv_status: "197"
        security_exempt_list: "<your_own_value>"
        security_external_logout: "<your_own_value>"
        security_external_web: "<your_own_value>"
        security_groups:
         -
            name: "default_name_202"
        security_mac_auth_bypass: "enable"
        security_mode: "none"
        security_redirect_url: "<your_own_value>"
        service_name: "<your_own_value>"
        sflow_sampler: "enable"
        snmp_index: "208"
        speed: "auto"
        spillover_threshold: "210"
        src_check: "enable"
        status: "up"
        stpforward: "enable"
        stpforward_mode: "rpl-all-ext-id"
        subst: "enable"
        substitute_dst_mac: "<your_own_value>"
        switch: "<your_own_value>"
        switch_controller_access_vlan: "enable"
        switch_controller_arp_inspection: "enable"
        switch_controller_dhcp_snooping: "enable"
        switch_controller_dhcp_snooping_option82: "enable"
        switch_controller_dhcp_snooping_verify_mac: "enable"
        switch_controller_igmp_snooping: "enable"
        switch_controller_learning_limit: "224"
        tagging:
         -
            category: "<your_own_value> (source system.object-tagging.category)"
            name: "default_name_227"
            tags:
             -
                name: "default_name_229 (source system.object-tagging.tags.name)"
        tcp_mss: "230"
        trust_ip_1: "<your_own_value>"
        trust_ip_2: "<your_own_value>"
        trust_ip_3: "<your_own_value>"
        trust_ip6_1: "<your_own_value>"
        trust_ip6_2: "<your_own_value>"
        trust_ip6_3: "<your_own_value>"
        type: "physical"
        username: "<your_own_value>"
        vdom: "<your_own_value> (source system.vdom.name)"
        vindex: "240"
        vlanforward: "enable"
        vlanid: "242"
        vrf: "243"
        vrrp:
         -
            accept_mode: "enable"
            adv_interval: "246"
            preempt: "enable"
            priority: "248"
            proxy_arp:
             -
                id:  "250"
                ip: "<your_own_value>"
            start_time: "252"
            status: "enable"
            version: "2"
            vrdst: "<your_own_value>"
            vrdst_priority: "256"
            vrgrp: "257"
            vrid: "258"
            vrip: "<your_own_value>"
        vrrp_virtual_mac: "enable"
        wccp: "enable"
        weight: "262"
        wins_ip: "<your_own_value>"

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 fortigate image returned: always type: str sample: 1547
  • http_method - Last method used to provision the content into FortiGate returned: always type: str sample: PUT
  • http_status - Last result given by FortiGate on last operation applied returned: always type: str sample: 200
  • mkey - Master key (id) used in the last call to FortiGate 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
  • revision - Internal revision number returned: always type: str sample: 17.0.2.10658
  • serial - Serial number of the unit returned: always type: str sample: FGVMEVYYQT3AB5352
  • status - Indication of the operation's result returned: always type: str sample: success
  • vdom - Virtual domain used returned: always type: str sample: root
  • version - Version of the FortiGate returned: always type: str sample: v5.6.3

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)
  • Nicolas Thomas (@thomnico)

Hint

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