fortiswitch_router_ospf6 – Router OSPF6 configuration in Fortinet’s FortiSwitch

New in version 1.0.0.


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


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

  • ansible>=2.11

FortiSW Version Compatibility

v7.0.0 v7.0.1 v7.0.2 v7.0.3
fortiswitch_router_ospf6 yes yes yes yes


  • 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
  • router_ospf6 - Router OSPF6 configuration. type: dict
    • area - OSPF6 area configuration. type: list member_path: area:id
      • filter_list - OSPF area filter-list configuration. type: list member_path: area:id/filter_list:id
        • direction - Direction. type: str choices: in, out
        • id - Filter list entry ID. type: int required: true
        • list - Access-list or prefix-list name. Source type: str
      • id - Area entry ip address. type: str required: true
      • range - OSPF6 area range configuration. type: list member_path: area:id/range:id
        • advertise - Enable/disable advertise status. type: str choices: disable, enable
        • id - Range entry id. type: int required: true
        • prefix6 - IPv6 prefix type: str
      • stub_type - Stub summary setting. type: str choices: no-summary, summary
      • type - Area type setting. type: str choices: regular, stub
    • interface - OSPF6 interface configuration. type: list member_path: interface:name
      • area_id - A.B.C.D, in IPv4 address format. type: str
      • bfd - Enable/Disable Bidirectional Forwarding Detection (BFD). type: str choices: enable, disable
      • cost - The cost of the interface. type: int
      • dead_interval - Dead interval. type: int
      • hello_interval - Hello interval. type: int
      • name - Interface name. Source type: str required: true
      • passive - Enable/disable passive interface. type: str choices: enable, disable
      • priority - Router priority. type: int
      • retransmit_interval - Time between retransmitting lost link state advertisements. type: int
      • status - Enable/disable OSPF6 routing on this interface. type: str choices: disable, enable
      • transmit_delay - Link state transmit delay. type: int
    • log_neighbor_changes - Enable logging of OSPF neighbor"s changes. type: str choices: enable, disable
    • redistribute - Redistribute configuration. type: list member_path: redistribute:name
      • metric - Redistribute metric setting. type: int
      • metric_type - metric type type: str choices: 1, 2
      • name - Redistribute name. type: str required: true
      • routemap - Route map name. Source type: str
      • status - status type: str choices: enable, disable
    • router_id - A.B.C.D, in IPv4 address format. type: str
    • spf_timers - SPF calculation frequency. type: str


- hosts: fortiswitch01
    - fortinet.fortiswitch
  connection: httpapi
   ansible_httpapi_use_ssl: yes
   ansible_httpapi_validate_certs: no
   ansible_httpapi_port: 443
  - name: Router OSPF6 configuration.
                direction: "in"
                id:  "6"
                list: "<your_own_value> (source"
            id:  "8"
                advertise: "disable"
                id:  "11"
                prefix6: "<your_own_value>"
            stub_type: "no-summary"
            type: "regular"
            area_id: "<your_own_value>"
            bfd: "enable"
            cost: "18"
            dead_interval: "19"
            hello_interval: "20"
            name: "default_name_21 (source"
            passive: "enable"
            priority: "23"
            retransmit_interval: "24"
            status: "disable"
            transmit_delay: "26"
        log_neighbor_changes: "enable"
            metric: "29"
            metric_type: "1"
            name: "default_name_31"
            routemap: "<your_own_value> (source"
            status: "enable"
        router_id: "<your_own_value>"
        spf_timers: "<your_own_value>"

Return Values

Common return values are documented:, 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


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


  • Link Zheng (@chillancezen)
  • Jie Xue (@JieX19)
  • Hongbin Lu (@fgtdev-hblu)
  • Frank Shen (@frankshen01)
  • Miguel Angel Munoz (@mamunozgonzalez)


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