Skip to content

Latest commit

 

History

History
1164 lines (1120 loc) · 53.5 KB

fortios_wanopt_profile.rst

File metadata and controls

1164 lines (1120 loc) · 53.5 KB
source:fortios_wanopt_profile.py
orphan:

fortios_wanopt_profile -- Configure WAN optimization profiles in Fortinet's FortiOS and FortiGate.

.. versionadded:: 2.0.0

  • 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

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

  • ansible>=2.14

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


Supported Version Ranges
fortios_wanopt_profile v6.0.0 -> latest

  • 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...
    Supported Version Ranges
    wanopt_profile v6.0.0 -> latest
    • 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...
      Supported Version Ranges
      auth_group v6.0.0 -> latest
    • cifs - Enable/disable CIFS (Windows sharing) WAN Optimization and configure CIFS WAN Optimization features. type: dict more...
      Supported Version Ranges
      cifs v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        byte_caching v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • log_traffic - Enable/disable logging. type: str choices: enable, disable more...
        Supported Version Ranges
        log_traffic v6.0.0 -> v7.2.2
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        port v6.0.0 -> v6.2.7
      • prefer_chunking - Select dynamic or fixed-size data chunking for WAN Optimization. type: str choices: dynamic, fix more...
        Supported Version Ranges
        prefer_chunking v6.0.0 -> latest
        [dynamic] v6.0.0 -> latest
        [fix] v6.0.0 -> latest
      • protocol_opt - Select protocol specific optimization or generic TCP optimization. type: str choices: protocol, tcp more...
        Supported Version Ranges
        protocol_opt v6.4.0 -> latest
        [protocol] v6.0.0 -> latest
        [tcp] v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        secure_tunnel v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • status - Enable/disable WAN Optimization. type: str choices: enable, disable more...
        Supported Version Ranges
        status v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • tunnel_sharing - Tunnel sharing mode for aggressive/non-aggressive and/or interactive/non-interactive protocols. type: str choices: shared, express-shared, private more...
        Supported Version Ranges
        tunnel_sharing v6.0.0 -> latest
        [shared] v6.0.0 -> latest
        [express-shared] v6.0.0 -> latest
        [private] v6.0.0 -> latest
    • comments - Comment. type: str more...
      Supported Version Ranges
      comments v6.0.0 -> latest
    • ftp - Enable/disable FTP WAN Optimization and configure FTP WAN Optimization features. type: dict more...
      Supported Version Ranges
      ftp v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        byte_caching v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • log_traffic - Enable/disable logging. type: str choices: enable, disable more...
        Supported Version Ranges
        log_traffic v6.0.0 -> v7.2.2
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        port v6.0.0 -> v6.2.7
      • prefer_chunking - Select dynamic or fixed-size data chunking for WAN Optimization. type: str choices: dynamic, fix more...
        Supported Version Ranges
        prefer_chunking v6.0.0 -> latest
        [dynamic] v6.0.0 -> latest
        [fix] v6.0.0 -> latest
      • protocol_opt - Select protocol specific optimization or generic TCP optimization. type: str choices: protocol, tcp more...
        Supported Version Ranges
        protocol_opt v6.4.0 -> latest
        [protocol] v6.0.0 -> latest
        [tcp] v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        secure_tunnel v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • ssl - Enable/disable SSL/TLS offloading (hardware acceleration) for traffic in this tunnel. type: str choices: enable, disable more...
        Supported Version Ranges
        ssl v6.4.0 -> v7.2.2
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • status - Enable/disable WAN Optimization. type: str choices: enable, disable more...
        Supported Version Ranges
        status v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • tunnel_sharing - Tunnel sharing mode for aggressive/non-aggressive and/or interactive/non-interactive protocols. type: str choices: shared, express-shared, private more...
        Supported Version Ranges
        tunnel_sharing v6.0.0 -> latest
        [shared] v6.0.0 -> latest
        [express-shared] v6.0.0 -> latest
        [private] v6.0.0 -> latest
    • http - Enable/disable HTTP WAN Optimization and configure HTTP WAN Optimization features. type: dict more...
      Supported Version Ranges
      http v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        byte_caching v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • log_traffic - Enable/disable logging. type: str choices: enable, disable more...
        Supported Version Ranges
        log_traffic v6.0.0 -> v7.2.2
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        port v6.0.0 -> v6.2.7
      • prefer_chunking - Select dynamic or fixed-size data chunking for WAN Optimization. type: str choices: dynamic, fix more...
        Supported Version Ranges
        prefer_chunking v6.0.0 -> latest
        [dynamic] v6.0.0 -> latest
        [fix] v6.0.0 -> latest
      • protocol_opt - Select protocol specific optimization or generic TCP optimization. type: str choices: protocol, tcp more...
        Supported Version Ranges
        protocol_opt v6.4.0 -> latest
        [protocol] v6.0.0 -> latest
        [tcp] v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        secure_tunnel v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • ssl - Enable/disable SSL/TLS offloading (hardware acceleration) for traffic in this tunnel. type: str choices: enable, disable more...
        Supported Version Ranges
        ssl v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • ssl_port - Port on which to expect HTTPS traffic for SSL/TLS offloading. type: int more...
        Supported Version Ranges
        ssl_port v6.0.0 -> v6.2.7
      • status - Enable/disable WAN Optimization. type: str choices: enable, disable more...
        Supported Version Ranges
        status v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        tunnel_non_http v6.0.0 -> v6.2.7
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • tunnel_sharing - Tunnel sharing mode for aggressive/non-aggressive and/or interactive/non-interactive protocols. type: str choices: shared, express-shared, private more...
        Supported Version Ranges
        tunnel_sharing v6.0.0 -> latest
        [shared] v6.0.0 -> latest
        [express-shared] v6.0.0 -> latest
        [private] v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        unknown_http_version v6.0.0 -> v6.2.7
        [reject] v6.0.0 -> latest
        [tunnel] v6.0.0 -> latest
        [best-effort] v6.0.0 -> latest
    • mapi - Enable/disable MAPI email WAN Optimization and configure MAPI WAN Optimization features. type: dict more...
      Supported Version Ranges
      mapi v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        byte_caching v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • log_traffic - Enable/disable logging. type: str choices: enable, disable more...
        Supported Version Ranges
        log_traffic v6.0.0 -> v7.2.2
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        port v6.0.0 -> v6.2.7
      • 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...
        Supported Version Ranges
        secure_tunnel v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • status - Enable/disable WAN Optimization. type: str choices: enable, disable more...
        Supported Version Ranges
        status v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • tunnel_sharing - Tunnel sharing mode for aggressive/non-aggressive and/or interactive/non-interactive protocols. type: str choices: shared, express-shared, private more...
        Supported Version Ranges
        tunnel_sharing v6.0.0 -> latest
        [shared] v6.0.0 -> latest
        [express-shared] v6.0.0 -> latest
        [private] v6.0.0 -> latest
    • name - Profile name. type: str required: true more...
      Supported Version Ranges
      name v6.0.0 -> latest
    • tcp - Enable/disable TCP WAN Optimization and configure TCP WAN Optimization features. type: dict more...
      Supported Version Ranges
      tcp v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        byte_caching v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        byte_caching_opt v6.0.0 -> latest
        [mem-only] v6.0.0 -> latest
        [mem-disk] v6.0.0 -> latest
      • log_traffic - Enable/disable logging. type: str choices: enable, disable more...
        Supported Version Ranges
        log_traffic v6.0.0 -> v7.2.2
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        port v6.0.0 -> latest
      • 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...
        Supported Version Ranges
        secure_tunnel v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • ssl - Enable/disable SSL/TLS offloading (hardware acceleration) for traffic in this tunnel. type: str choices: enable, disable more...
        Supported Version Ranges
        ssl v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • ssl_port - Port numbers or port number ranges on which to expect HTTPS traffic for SSL/TLS offloading. type: str more...
        Supported Version Ranges
        ssl_port v6.0.0 -> latest
      • status - Enable/disable WAN Optimization. type: str choices: enable, disable more...
        Supported Version Ranges
        status v6.0.0 -> latest
        [enable] v6.0.0 -> latest
        [disable] v6.0.0 -> latest
      • tunnel_sharing - Tunnel sharing mode for aggressive/non-aggressive and/or interactive/non-interactive protocols. type: str choices: shared, express-shared, private more...
        Supported Version Ranges
        tunnel_sharing v6.0.0 -> latest
        [shared] v6.0.0 -> latest
        [express-shared] v6.0.0 -> latest
        [private] v6.0.0 -> latest
    • transparent - Enable/disable transparent mode. type: str choices: enable, disable more...
      Supported Version Ranges
      transparent v6.0.0 -> latest
      [enable] v6.0.0 -> latest
      [disable] v6.0.0 -> latest

Note

  • Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
- 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"

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
  • 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)
  • Nicolas Thomas (@thomnico)

Hint

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