ansible.builtin.fortios_router_ospf6 (v2.8.20) — module

Configure IPv6 OSPF in Fortinet's FortiOS and FortiGate.

| "added in version" 2.8 of ansible.builtin"

Authors: Miguel Angel Munoz (@mamunozgonzalez), Nicolas Thomas (@thomnico)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.8.20

Description

This module is able to configure a FortiGate or FortiOS 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 v6.0.2


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- hosts: localhost
  vars:
   host: "192.168.122.40"
   username: "admin"
   password: ""
   vdom: "root"
  tasks:
  - name: Configure IPv6 OSPF.
    fortios_router_ospf6:
      host:  "{{ host }}"
      username: "{{ username }}"
      password: "{{ password }}"
      vdom:  "{{ vdom }}"
      https: "False"
      router_ospf6:
        abr-type: "cisco"
        area:
         -
            default-cost: "5"
            id:  "6"
            nssa-default-information-originate: "enable"
            nssa-default-information-originate-metric: "8"
            nssa-default-information-originate-metric-type: "1"
            nssa-redistribution: "enable"
            nssa-translator-role: "candidate"
            range:
             -
                advertise: "disable"
                id:  "14"
                prefix6: "<your_own_value>"
            stub-type: "no-summary"
            type: "regular"
            virtual-link:
             -
                dead-interval: "19"
                hello-interval: "20"
                name: "default_name_21"
                peer: "<your_own_value>"
                retransmit-interval: "23"
                transmit-delay: "24"
        auto-cost-ref-bandwidth: "25"
        bfd: "enable"
        default-information-metric: "27"
        default-information-metric-type: "1"
        default-information-originate: "enable"
        default-information-route-map: "<your_own_value> (source router.route-map.name)"
        default-metric: "31"
        log-neighbour-changes: "enable"
        ospf6-interface:
         -
            area-id: "<your_own_value>"
            bfd: "global"
            cost: "36"
            dead-interval: "37"
            hello-interval: "38"
            interface: "<your_own_value> (source system.interface.name)"
            name: "default_name_40"
            neighbor:
             -
                cost: "42"
                ip6: "<your_own_value>"
                poll-interval: "44"
                priority: "45"
            network-type: "broadcast"
            priority: "47"
            retransmit-interval: "48"
            status: "disable"
            transmit-delay: "50"
        passive-interface:
         -
            name: "default_name_52 (source system.interface.name)"
        redistribute:
         -
            metric: "54"
            metric-type: "1"
            name: "default_name_56"
            routemap: "<your_own_value> (source router.route-map.name)"
            status: "enable"
        router-id: "<your_own_value>"
        spf-timers: "<your_own_value>"
        summary-address:
         -
            advertise: "disable"
            id:  "63"
            prefix6: "<your_own_value>"
            tag: "65"

Inputs

    
host:
    description:
    - FortiOS or FortiGate ip address.
    required: true

vdom:
    default: root
    description:
    - 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.

https:
    default: true
    description:
    - Indicates if the requests towards FortiGate must use HTTPS protocol
    type: bool

password:
    default: ''
    description:
    - FortiOS or FortiGate password.

username:
    description:
    - FortiOS or FortiGate username.
    required: true

router_ospf6:
    default: null
    description:
    - Configure IPv6 OSPF.
    suboptions:
      abr-type:
        choices:
        - cisco
        - ibm
        - standard
        description:
        - Area border router type.
      area:
        description:
        - OSPF6 area configuration.
        suboptions:
          default-cost:
            description:
            - Summary default cost of stub or NSSA area.
          id:
            description:
            - Area entry IP address.
            required: true
          nssa-default-information-originate:
            choices:
            - enable
            - disable
            description:
            - Enable/disable originate type 7 default into NSSA area.
          nssa-default-information-originate-metric:
            description:
            - OSPFv3 default metric.
          nssa-default-information-originate-metric-type:
            choices:
            - 1
            - 2
            description:
            - OSPFv3 metric type for default routes.
          nssa-redistribution:
            choices:
            - enable
            - disable
            description:
            - Enable/disable redistribute into NSSA area.
          nssa-translator-role:
            choices:
            - candidate
            - never
            - always
            description:
            - NSSA translator role type.
          range:
            description:
            - OSPF6 area range configuration.
            suboptions:
              advertise:
                choices:
                - disable
                - enable
                description:
                - Enable/disable advertise status.
              id:
                description:
                - Range entry ID.
                required: true
              prefix6:
                description:
                - IPv6 prefix.
          stub-type:
            choices:
            - no-summary
            - summary
            description:
            - Stub summary setting.
          type:
            choices:
            - regular
            - nssa
            - stub
            description:
            - Area type setting.
          virtual-link:
            description:
            - OSPF6 virtual link configuration.
            suboptions:
              dead-interval:
                description:
                - Dead interval.
              hello-interval:
                description:
                - Hello interval.
              name:
                description:
                - Virtual link entry name.
                required: true
              peer:
                description:
                - A.B.C.D, peer router ID.
              retransmit-interval:
                description:
                - Retransmit interval.
              transmit-delay:
                description:
                - Transmit delay.
      auto-cost-ref-bandwidth:
        description:
        - Reference bandwidth in terms of megabits per second.
      bfd:
        choices:
        - enable
        - disable
        description:
        - Enable/disable Bidirectional Forwarding Detection (BFD).
      default-information-metric:
        description:
        - Default information metric.
      default-information-metric-type:
        choices:
        - 1
        - 2
        description:
        - Default information metric type.
      default-information-originate:
        choices:
        - enable
        - always
        - disable
        description:
        - Enable/disable generation of default route.
      default-information-route-map:
        description:
        - Default information route map. Source router.route-map.name.
      default-metric:
        description:
        - Default metric of redistribute routes.
      log-neighbour-changes:
        choices:
        - enable
        - disable
        description:
        - Enable logging of OSPFv3 neighbour's changes
      ospf6-interface:
        description:
        - OSPF6 interface configuration.
        suboptions:
          area-id:
            description:
            - A.B.C.D, in IPv4 address format.
          bfd:
            choices:
            - global
            - enable
            - disable
            description:
            - Enable/disable Bidirectional Forwarding Detection (BFD).
          cost:
            description:
            - Cost of the interface, value range from 0 to 65535, 0 means auto-cost.
          dead-interval:
            description:
            - Dead interval.
          hello-interval:
            description:
            - Hello interval.
          interface:
            description:
            - Configuration interface name. Source system.interface.name.
          name:
            description:
            - Interface entry name.
            required: true
          neighbor:
            description:
            - OSPFv3 neighbors are used when OSPFv3 runs on non-broadcast media
            suboptions:
              cost:
                description:
                - Cost of the interface, value range from 0 to 65535, 0 means auto-cost.
              ip6:
                description:
                - IPv6 link local address of the neighbor.
                required: true
              poll-interval:
                description:
                - Poll interval time in seconds.
              priority:
                description:
                - priority
          network-type:
            choices:
            - broadcast
            - point-to-point
            - non-broadcast
            - point-to-multipoint
            - point-to-multipoint-non-broadcast
            description:
            - Network type.
          priority:
            description:
            - priority
          retransmit-interval:
            description:
            - Retransmit interval.
          status:
            choices:
            - disable
            - enable
            description:
            - Enable/disable OSPF6 routing on this interface.
          transmit-delay:
            description:
            - Transmit delay.
      passive-interface:
        description:
        - Passive interface configuration.
        suboptions:
          name:
            description:
            - Passive interface name. Source system.interface.name.
            required: true
      redistribute:
        description:
        - Redistribute configuration.
        suboptions:
          metric:
            description:
            - Redistribute metric setting.
          metric-type:
            choices:
            - 1
            - 2
            description:
            - Metric type.
          name:
            description:
            - Redistribute name.
            required: true
          routemap:
            description:
            - Route map name. Source router.route-map.name.
          status:
            choices:
            - enable
            - disable
            description:
            - status
      router-id:
        description:
        - A.B.C.D, in IPv4 address format.
      spf-timers:
        description:
        - SPF calculation frequency.
      summary-address:
        description:
        - IPv6 address summary configuration.
        suboptions:
          advertise:
            choices:
            - disable
            - enable
            description:
            - Enable/disable advertise status.
          id:
            description:
            - Summary address entry ID.
            required: true
          prefix6:
            description:
            - IPv6 prefix.
          tag:
            description:
            - Tag value.

Outputs

build:
  description: Build number of the fortigate image
  returned: always
  sample: '1547'
  type: str
http_method:
  description: Last method used to provision the content into FortiGate
  returned: always
  sample: PUT
  type: str
http_status:
  description: Last result given by FortiGate on last operation applied
  returned: always
  sample: '200'
  type: str
mkey:
  description: Master key (id) used in the last call to FortiGate
  returned: success
  sample: id
  type: str
name:
  description: Name of the table used to fulfill the request
  returned: always
  sample: urlfilter
  type: str
path:
  description: Path of the table used to fulfill the request
  returned: always
  sample: webfilter
  type: str
revision:
  description: Internal revision number
  returned: always
  sample: 17.0.2.10658
  type: str
serial:
  description: Serial number of the unit
  returned: always
  sample: FGVMEVYYQT3AB5352
  type: str
status:
  description: Indication of the operation's result
  returned: always
  sample: success
  type: str
vdom:
  description: Virtual domain used
  returned: always
  sample: root
  type: str
version:
  description: Version of the FortiGate
  returned: always
  sample: v5.6.3
  type: str