fortios_wanopt_profile – Configure WAN optimization profiles 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 wanopt feature and profile 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.15

Tips

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

FortiOS Version Compatibility

Supported Version Ranges: v6.0.0 -> 7.4.3

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
  • state - Indicates whether to create or remove the object. type: str required: true choices: present, absent
  • wanopt_profile - Configure WAN optimization profiles. type: dict more...
    • auth_group - Optionally add an authentication group to restrict access to the WAN Optimization tunnel to peers in the authentication group. Source wanopt.auth-group.name. type: str more...
    • cifs - Enable/disable CIFS (Windows sharing) WAN Optimization and configure CIFS WAN Optimization features. type: dict more...
      • byte_caching - Enable/disable byte-caching. Byte caching reduces the amount of traffic by caching file data sent across the WAN and in future serving if from the cache. type: str choices: enable, disable more...
      • log_traffic - Enable/disable logging. type: str choices: enable, disable more...
      • port - Single port number or port number range for CIFS. Only packets with a destination port number that matches this port number or range are accepted by this profile. type: int more...
      • prefer_chunking - Select dynamic or fixed-size data chunking for WAN Optimization. type: str choices: dynamic, fix more...
      • protocol_opt - Select protocol specific optimization or generic TCP optimization. type: str choices: protocol, tcp more...
      • secure_tunnel - Enable/disable securing the WAN Opt tunnel using SSL. Secure and non-secure tunnels use the same TCP port (7810). type: str choices: enable, disable more...
      • status - Enable/disable WAN Optimization. type: str choices: enable, disable more...
      • tunnel_sharing - Tunnel sharing mode for aggressive/non-aggressive and/or interactive/non-interactive protocols. type: str choices: shared, express-shared, private more...
    • comments - Comment. type: str more...
    • ftp - Enable/disable FTP WAN Optimization and configure FTP WAN Optimization features. type: dict more...
      • byte_caching - Enable/disable byte-caching. Byte caching reduces the amount of traffic by caching file data sent across the WAN and in future serving if from the cache. type: str choices: enable, disable more...
      • log_traffic - Enable/disable logging. type: str choices: enable, disable more...
      • port - Single port number or port number range for FTP. Only packets with a destination port number that matches this port number or range are accepted by this profile. type: int more...
      • prefer_chunking - Select dynamic or fixed-size data chunking for WAN Optimization. type: str choices: dynamic, fix more...
      • protocol_opt - Select protocol specific optimization or generic TCP optimization. type: str choices: protocol, tcp more...
      • secure_tunnel - Enable/disable securing the WAN Opt tunnel using SSL. Secure and non-secure tunnels use the same TCP port (7810). type: str choices: enable, disable more...
      • ssl - Enable/disable SSL/TLS offloading (hardware acceleration) for traffic in this tunnel. type: str choices: enable, disable more...
      • status - Enable/disable WAN Optimization. type: str choices: enable, disable more...
      • tunnel_sharing - Tunnel sharing mode for aggressive/non-aggressive and/or interactive/non-interactive protocols. type: str choices: shared, express-shared, private more...
    • http - Enable/disable HTTP WAN Optimization and configure HTTP WAN Optimization features. type: dict more...
      • byte_caching - Enable/disable byte-caching. Byte caching reduces the amount of traffic by caching file data sent across the WAN and in future serving if from the cache. type: str choices: enable, disable more...
      • log_traffic - Enable/disable logging. type: str choices: enable, disable more...
      • port - Single port number or port number range for HTTP. Only packets with a destination port number that matches this port number or range are accepted by this profile. type: int more...
      • prefer_chunking - Select dynamic or fixed-size data chunking for WAN Optimization. type: str choices: dynamic, fix more...
      • protocol_opt - Select protocol specific optimization or generic TCP optimization. type: str choices: protocol, tcp more...
      • secure_tunnel - Enable/disable securing the WAN Opt tunnel using SSL. Secure and non-secure tunnels use the same TCP port (7810). type: str choices: enable, disable more...
      • ssl - Enable/disable SSL/TLS offloading (hardware acceleration) for traffic in this tunnel. type: str choices: enable, disable more...
      • ssl_port - Port on which to expect HTTPS traffic for SSL/TLS offloading. type: int more...
      • status - Enable/disable WAN Optimization. type: str choices: enable, disable more...
      • tunnel_non_http - Configure how to process non-HTTP traffic when a profile configured for HTTP traffic accepts a non-HTTP session. Can occur if an application sends non-HTTP traffic using an HTTP destination port. type: str choices: enable, disable more...
      • tunnel_sharing - Tunnel sharing mode for aggressive/non-aggressive and/or interactive/non-interactive protocols. type: str choices: shared, express-shared, private more...
      • unknown_http_version - How to handle HTTP sessions that do not comply with HTTP 0.9, 1.0, or 1.1. type: str choices: reject, tunnel, best-effort more...
    • mapi - Enable/disable MAPI email WAN Optimization and configure MAPI WAN Optimization features. type: dict more...
      • byte_caching - Enable/disable byte-caching. Byte caching reduces the amount of traffic by caching file data sent across the WAN and in future serving if from the cache. type: str choices: enable, disable more...
      • log_traffic - Enable/disable logging. type: str choices: enable, disable more...
      • port - Single port number or port number range for MAPI. Only packets with a destination port number that matches this port number or range are accepted by this profile. type: int more...
      • secure_tunnel - Enable/disable securing the WAN Opt tunnel using SSL. Secure and non-secure tunnels use the same TCP port (7810). type: str choices: enable, disable more...
      • status - Enable/disable WAN Optimization. type: str choices: enable, disable more...
      • tunnel_sharing - Tunnel sharing mode for aggressive/non-aggressive and/or interactive/non-interactive protocols. type: str choices: shared, express-shared, private more...
    • name - Profile name. type: str required: true more...
    • tcp - Enable/disable TCP WAN Optimization and configure TCP WAN Optimization features. type: dict more...
      • byte_caching - Enable/disable byte-caching. Byte caching reduces the amount of traffic by caching file data sent across the WAN and in future serving if from the cache. type: str choices: enable, disable more...
      • byte_caching_opt - Select whether TCP byte-caching uses system memory only or both memory and disk space. type: str choices: mem-only, mem-disk more...
      • log_traffic - Enable/disable logging. type: str choices: enable, disable more...
      • port - Port numbers or port number ranges for TCP. Only packets with a destination port number that matches this port number or range are accepted by this profile. type: str more...
      • secure_tunnel - Enable/disable securing the WAN Opt tunnel using SSL. Secure and non-secure tunnels use the same TCP port (7810). type: str choices: enable, disable more...
      • ssl - Enable/disable SSL/TLS offloading (hardware acceleration) for traffic in this tunnel. type: str choices: enable, disable more...
      • ssl_port - Port numbers or port number ranges on which to expect HTTPS traffic for SSL/TLS offloading. type: str more...
      • status - Enable/disable WAN Optimization. type: str choices: enable, disable more...
      • tunnel_sharing - Tunnel sharing mode for aggressive/non-aggressive and/or interactive/non-interactive protocols. type: str choices: shared, express-shared, private more...
    • transparent - Enable/disable transparent mode. type: str choices: enable, disable more...

Notes

Note

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

Examples

- name: Configure WAN optimization profiles.
  fortinet.fortios.fortios_wanopt_profile:
      vdom: "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      wanopt_profile:
          auth_group: "<your_own_value> (source wanopt.auth-group.name)"
          cifs:
              byte_caching: "enable"
              log_traffic: "enable"
              port: "32767"
              prefer_chunking: "dynamic"
              protocol_opt: "protocol"
              secure_tunnel: "enable"
              status: "enable"
              tunnel_sharing: "shared"
          comments: "<your_own_value>"
          ftp:
              byte_caching: "enable"
              log_traffic: "enable"
              port: "32767"
              prefer_chunking: "dynamic"
              protocol_opt: "protocol"
              secure_tunnel: "enable"
              ssl: "enable"
              status: "enable"
              tunnel_sharing: "shared"
          http:
              byte_caching: "enable"
              log_traffic: "enable"
              port: "32767"
              prefer_chunking: "dynamic"
              protocol_opt: "protocol"
              secure_tunnel: "enable"
              ssl: "enable"
              ssl_port: "32767"
              status: "enable"
              tunnel_non_http: "enable"
              tunnel_sharing: "shared"
              unknown_http_version: "reject"
          mapi:
              byte_caching: "enable"
              log_traffic: "enable"
              port: "32767"
              secure_tunnel: "enable"
              status: "enable"
              tunnel_sharing: "shared"
          name: "default_name_44"
          tcp:
              byte_caching: "enable"
              byte_caching_opt: "mem-only"
              log_traffic: "enable"
              port: "<your_own_value>"
              secure_tunnel: "enable"
              ssl: "enable"
              ssl_port: "<your_own_value>"
              status: "enable"
              tunnel_sharing: "shared"
          transparent: "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.