fortios_system_npu – Configure NPU attributes in Fortinet’s FortiOS and FortiGate.

New in version 2.0.0.

Synopsis

  • This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify system feature and npu 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

Tips

Using member operation to add an element to an existing object.

FortiOS Version Compatibility


v6.0.0 v6.0.5 v6.0.11 v6.2.0 v6.2.3 v6.2.5 v6.2.7 v6.4.0 v6.4.1 v6.4.4 v7.0.0 v7.0.1 v7.0.2 v7.0.3 v7.0.4 v7.0.5 v7.2.0
fortios_system_npu yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes

Parameters

  • access_token - Token-based authentication. Generated from GUI of Fortigate. type: str required: false
  • enable_log - Enable/Disable logging for task. type: bool required: false default: 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
  • 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
  • system_npu - Configure NPU attributes. type: dict more...
    • capwap_offload - Enable/disable offloading managed FortiAP and FortiLink CAPWAP sessions. type: str choices: enable, disable more...
    • dedicated_management_affinity - Affinity setting for management deamons (hexadecimal value up to 256 bits in the format of xxxxxxxxxxxxxxxx). type: str more...
    • dedicated_management_cpu - Enable to dedicate one CPU for GUI and CLI connections when NPs are busy. type: str choices: enable, disable more...
    • fastpath - Enable/disable NP6 offloading (also called fast path). type: str choices: disable, enable more...
    • gtp_enhanced_cpu_range - GTP enhanced CPU range option. type: str choices: 0, 1, 2 more...
    • gtp_enhanced_mode - Enable/disable GTP enhanced mode. type: str choices: enable, disable more...
    • intf_shaping_offload - Enable/disable NPU offload when doing interface-based traffic shaping according to the egress-shaping-profile. type: str choices: enable, disable more...
    • ipsec_dec_subengine_mask - IPsec decryption subengine mask (0x1 - 0xff). type: str more...
    • ipsec_enc_subengine_mask - IPsec encryption subengine mask (0x1 - 0xff). type: str more...
    • ipsec_inbound_cache - Enable/disable IPsec inbound cache for anti-replay. type: str choices: enable, disable more...
    • ipsec_mtu_override - Enable/disable NP6 IPsec MTU override. type: str choices: disable, enable more...
    • ipsec_over_vlink - Enable/disable IPSEC over vlink. type: str choices: enable, disable more...
    • isf_np_queues - Configure queues of switch port connected to NP6 XAUI on ingress path. type: dict more...
      • cos0 - CoS profile name for CoS 0. Source system.isf-queue-profile.name. type: str more...
      • cos1 - CoS profile name for CoS 1. Source system.isf-queue-profile.name. type: str more...
      • cos2 - CoS profile name for CoS 2. Source system.isf-queue-profile.name. type: str more...
      • cos3 - CoS profile name for CoS 3. Source system.isf-queue-profile.name. type: str more...
      • cos4 - CoS profile name for CoS 4. Source system.isf-queue-profile.name. type: str more...
      • cos5 - CoS profile name for CoS 5. Source system.isf-queue-profile.name. type: str more...
      • cos6 - CoS profile name for CoS 6. Source system.isf-queue-profile.name. type: str more...
      • cos7 - CoS profile name for CoS 7. Source system.isf-queue-profile.name. type: str more...
    • lag_out_port_select - Enable/disable LAG outgoing port selection based on incoming traffic port. type: str choices: disable, enable more...
    • mcast_session_accounting - Enable/disable traffic accounting for each multicast session through TAE counter. type: str choices: tpe-based, session-based, disable more...
    • port_cpu_map - Configure NPU interface to CPU core mapping. type: list more...
      • cpu_core - The CPU core to map to an interface. type: str more...
      • interface - The interface to map to a CPU core. type: str more...
    • port_npu_map - Configure port to NPU group mapping. type: list more...
      • interface - Set npu interface port to NPU group map. type: str more...
      • npu_group_index - Mapping NPU group index. type: int more...
    • priority_protocol - Configure NPU priority protocol. type: dict more...
      • bfd - Enable/disable NPU BFD priority protocol. type: str choices: enable, disable more...
      • bgp - Enable/disable NPU BGP priority protocol. type: str choices: enable, disable more...
      • slbc - Enable/disable NPU SLBC priority protocol. type: str choices: enable, disable more...
    • qos_mode - QoS mode on switch and NP. type: str choices: disable, priority, round-robin more...
    • rdp_offload - Enable/disable rdp offload. type: str choices: enable, disable more...
    • session_denied_offload - Enable/disable offloading of denied sessions. Requires ses-denied-traffic to be set. type: str choices: disable, enable more...
    • sse_backpressure - Enable/disable sse backpressure. type: str choices: enable, disable more...
    • strip_clear_text_padding - Enable/disable stripping clear text padding. type: str choices: enable, disable more...
    • strip_esp_padding - Enable/disable stripping ESP padding. type: str choices: enable, disable more...
    • sw_eh_hash - Configure switch enhanced hashing. type: dict more...
      • computation - Set hashing computation. type: str choices: xor16, xor8, xor4, crc16 more...
      • destination_ip_lower_16 - Include/exclude destination IP address lower 16 bits. type: str choices: include, exclude more...
      • destination_ip_upper_16 - Include/exclude destination IP address upper 16 bits. type: str choices: include, exclude more...
      • destination_port - Include/exclude destination port if TCP/UDP. type: str choices: include, exclude more...
      • ip_protocol - Include/exclude IP protocol. type: str choices: include, exclude more...
      • netmask_length - Network mask length. type: int more...
      • source_ip_lower_16 - Include/exclude source IP address lower 16 bits. type: str choices: include, exclude more...
      • source_ip_upper_16 - Include/exclude source IP address upper 16 bits. type: str choices: include, exclude more...
      • source_port - Include/exclude source port if TCP/UDP. type: str choices: include, exclude more...
    • sw_np_bandwidth - Bandwidth from switch to NP. type: str choices: 0G, 2G, 4G, 5G, 6G more...
    • uesp_offload - Enable/disable UDP-encapsulated ESP offload . type: str choices: enable, disable more...

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 NPU attributes.
    fortios_system_npu:
      vdom:  "{{ vdom }}"
      system_npu:
        capwap_offload: "enable"
        dedicated_management_affinity: "<your_own_value>"
        dedicated_management_cpu: "enable"
        fastpath: "disable"
        gtp_enhanced_cpu_range: "0"
        gtp_enhanced_mode: "enable"
        intf_shaping_offload: "enable"
        ipsec_dec_subengine_mask: "<your_own_value>"
        ipsec_enc_subengine_mask: "<your_own_value>"
        ipsec_inbound_cache: "enable"
        ipsec_mtu_override: "disable"
        ipsec_over_vlink: "enable"
        isf_np_queues:
            cos0: "<your_own_value> (source system.isf-queue-profile.name)"
            cos1: "<your_own_value> (source system.isf-queue-profile.name)"
            cos2: "<your_own_value> (source system.isf-queue-profile.name)"
            cos3: "<your_own_value> (source system.isf-queue-profile.name)"
            cos4: "<your_own_value> (source system.isf-queue-profile.name)"
            cos5: "<your_own_value> (source system.isf-queue-profile.name)"
            cos6: "<your_own_value> (source system.isf-queue-profile.name)"
            cos7: "<your_own_value> (source system.isf-queue-profile.name)"
        lag_out_port_select: "disable"
        mcast_session_accounting: "tpe-based"
        port_cpu_map:
         -
            cpu_core: "<your_own_value>"
            interface: "<your_own_value>"
        port_npu_map:
         -
            interface: "<your_own_value>"
            npu_group_index: "0"
        priority_protocol:
            bfd: "enable"
            bgp: "enable"
            slbc: "enable"
        qos_mode: "disable"
        rdp_offload: "enable"
        session_denied_offload: "disable"
        sse_backpressure: "enable"
        strip_clear_text_padding: "enable"
        strip_esp_padding: "enable"
        sw_eh_hash:
            computation: "xor16"
            destination_ip_lower_16: "include"
            destination_ip_upper_16: "include"
            destination_port: "include"
            ip_protocol: "include"
            netmask_length: "32"
            source_ip_lower_16: "include"
            source_ip_upper_16: "include"
            source_port: "include"
        sw_np_bandwidth: "0G"
        uesp_offload: "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 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.