W3cubDocs

/Ansible

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

Note

This plugin is part of the fortinet.fortios collection (version 2.1.2).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install fortinet.fortios.

To use it in a playbook, specify: fortinet.fortios.fortios_system_npu.

New in version 2.10: of fortinet.fortios

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.0

Parameters

Parameter Choices/Defaults Comments
access_token
string
Token-based authentication. Generated from GUI of Fortigate.
enable_log
boolean
    Choices:
  • no
  • yes
Enable/Disable logging for task.
system_npu
dictionary
Configure NPU attributes.
capwap_offload
string
    Choices:
  • enable
  • disable
Enable/disable offloading managed FortiAP and FortiLink CAPWAP sessions.
dedicated_management_cpu
string
    Choices:
  • enable
  • disable
Enable to dedicate one CPU for GUI and CLI connections when NPs are busy.
fastpath
string
    Choices:
  • disable
  • enable
Enable/disable NP6 offloading (also called fast path).
gtp_enhanced_cpu_range
string
    Choices:
  • 0
  • 1
  • 2
GTP enhanced CPU range option.
gtp_enhanced_mode
string
    Choices:
  • enable
  • disable
Enable/disable GTP enhanced mode.
intf_shaping_offload
string
    Choices:
  • enable
  • disable
Enable/disable NPU offload when doing interface-based traffic shaping according to the egress-shaping-profile.
ipsec_dec_subengine_mask
string
IPsec decryption subengine mask (0x1 - 0xff).
ipsec_enc_subengine_mask
string
IPsec encryption subengine mask (0x1 - 0xff).
ipsec_inbound_cache
string
    Choices:
  • enable
  • disable
Enable/disable IPsec inbound cache for anti-replay.
ipsec_mtu_override
string
    Choices:
  • disable
  • enable
Enable/disable NP6 IPsec MTU override.
ipsec_over_vlink
string
    Choices:
  • enable
  • disable
Enable/disable IPSEC over vlink.
isf_np_queues
dictionary
Configure queues of switch port connected to NP6 XAUI on ingress path.
cos0
string
CoS profile name for CoS 0. Source system.isf-queue-profile.name.
cos1
string
CoS profile name for CoS 1. Source system.isf-queue-profile.name.
cos2
string
CoS profile name for CoS 2. Source system.isf-queue-profile.name.
cos3
string
CoS profile name for CoS 3. Source system.isf-queue-profile.name.
cos4
string
CoS profile name for CoS 4. Source system.isf-queue-profile.name.
cos5
string
CoS profile name for CoS 5. Source system.isf-queue-profile.name.
cos6
string
CoS profile name for CoS 6. Source system.isf-queue-profile.name.
cos7
string
CoS profile name for CoS 7. Source system.isf-queue-profile.name.
lag_out_port_select
string
    Choices:
  • disable
  • enable
Enable/disable LAG outgoing port selection based on incoming traffic port.
mcast_session_accounting
string
    Choices:
  • tpe-based
  • session-based
  • disable
Enable/disable traffic accounting for each multicast session through TAE counter.
port_cpu_map
list / elements=string
Configure NPU interface to CPU core mapping.
cpu_core
string
The CPU core to map to an interface.
interface
string / required
The interface to map to a CPU core.
port_npu_map
list / elements=string
Configure port to NPU group mapping.
interface
string / required
Set npu interface port to NPU group map.
npu_group_index
integer
Mapping NPU group index.
priority_protocol
string
Configure NPU priority protocol.
bfd
string
    Choices:
  • enable
  • disable
Enable/disable NPU BFD priority protocol.
bgp
string
    Choices:
  • enable
  • disable
Enable/disable NPU BGP priority protocol.
slbc
string
    Choices:
  • enable
  • disable
Enable/disable NPU SLBC priority protocol.
qos_mode
string
    Choices:
  • disable
  • priority
  • round-robin
QoS mode on switch and NP.
rdp_offload
string
    Choices:
  • enable
  • disable
Enable/disable rdp offload.
session_denied_offload
string
    Choices:
  • disable
  • enable
Enable/disable offloading of denied sessions. Requires ses-denied-traffic to be set.
sse_backpressure
string
    Choices:
  • enable
  • disable
Enable/disable sse backpressure.
strip_clear_text_padding
string
    Choices:
  • enable
  • disable
Enable/disable stripping clear text padding.
strip_esp_padding
string
    Choices:
  • enable
  • disable
Enable/disable stripping ESP padding.
sw_np_bandwidth
string
    Choices:
  • 0G
  • 2G
  • 4G
  • 5G
  • 6G
Bandwidth from switch to NP.
uesp_offload
string
    Choices:
  • enable
  • disable
Enable/disable UDP-encapsulated ESP offload .
vdom
string
Default:
"root"
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.

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_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: "30"
        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_np_bandwidth: "0G"
        uesp_offload: "enable"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
build
string
always
Build number of the fortigate image

Sample:
1547
http_method
string
always
Last method used to provision the content into FortiGate

Sample:
PUT
http_status
string
always
Last result given by FortiGate on last operation applied

Sample:
200
mkey
string
success
Master key (id) used in the last call to FortiGate

Sample:
id
name
string
always
Name of the table used to fulfill the request

Sample:
urlfilter
path
string
always
Path of the table used to fulfill the request

Sample:
webfilter
revision
string
always
Internal revision number

Sample:
17.0.2.10658
serial
string
always
Serial number of the unit

Sample:
FGVMEVYYQT3AB5352
status
string
always
Indication of the operation's result

Sample:
success
vdom
string
always
Virtual domain used

Sample:
root
version
string
always
Version of the FortiGate

Sample:
v5.6.3


Authors

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

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/fortinet/fortios/fortios_system_npu_module.html