fortinet / fortinet.fortios / 1.0.7 / module / fortios_wanopt_webcache Configure global Web cache settings in Fortinet's FortiOS and FortiGate. | "added in version" 2.9 of fortinet.fortios" Authors: Miguel Angel Munoz (@mamunozgonzalez), Nicolas Thomas (@thomnico) preview | supported by communityfortinet.fortios.fortios_wanopt_webcache (1.0.7) — module
Install with ansible-galaxy collection install fortinet.fortios:==1.0.7
collections: - name: fortinet.fortios version: 1.0.7
This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify wanopt feature and webcache category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.5
- hosts: localhost vars: host: "192.168.122.40" username: "admin" password: "" vdom: "root" ssl_verify: "False" tasks: - name: Configure global Web cache settings. fortios_wanopt_webcache: host: "{{ host }}" username: "{{ username }}" password: "{{ password }}" vdom: "{{ vdom }}" https: "False" wanopt_webcache: always_revalidate: "enable" cache_by_default: "enable" cache_cookie: "enable" cache_expired: "enable" default_ttl: "7" external: "enable" fresh_factor: "9" host_validate: "enable" ignore_conditional: "enable" ignore_ie_reload: "enable" ignore_ims: "enable" ignore_pnc: "enable" max_object_size: "15" max_ttl: "16" min_ttl: "17" neg_resp_time: "18" reval_pnc: "enable"
host: description: - FortiOS or FortiGate IP address. required: false type: str 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. type: str https: default: true description: - Indicates if the requests towards FortiGate must use HTTPS protocol. type: bool password: default: '' description: - FortiOS or FortiGate password. type: str username: description: - FortiOS or FortiGate username. required: false type: str ssl_verify: default: true description: - Ensures FortiGate certificate must be verified by a proper CA. type: bool wanopt_webcache: default: null description: - Configure global Web cache settings. suboptions: always_revalidate: choices: - enable - disable description: - Enable/disable revalidation of requested cached objects, which have content on the server, before serving it to the client. type: str cache_by_default: choices: - enable - disable description: - Enable/disable caching content that lacks explicit caching policies from the server. type: str cache_cookie: choices: - enable - disable description: - Enable/disable caching cookies. Since cookies contain information for or about individual users, they not usually cached. type: str cache_expired: choices: - enable - disable description: - Enable/disable caching type-1 objects that are already expired on arrival. type: str default_ttl: description: - Default object expiry time . This only applies to those objects that do not have an expiry time set by the web server. type: int external: choices: - enable - disable description: - Enable/disable external Web caching. type: str fresh_factor: description: - Frequency that the server is checked to see if any objects have expired (1 - 100). The higher the fresh factor, the less often the checks occur. type: int host_validate: choices: - enable - disable description: - 'Enable/disable validating Host: with original server IP.' type: str ignore_conditional: choices: - enable - disable description: - Enable/disable controlling the behavior of cache-control HTTP 1.1 header values. type: str ignore_ie_reload: choices: - enable - disable description: - 'Enable/disable ignoring the PNC-interpretation of Internet Explorer''s Accept: / header.' type: str ignore_ims: choices: - enable - disable description: - Enable/disable ignoring the if-modified-since (IMS) header. type: str ignore_pnc: choices: - enable - disable description: - Enable/disable ignoring the pragma no-cache (PNC) header. type: str max_object_size: description: - Maximum cacheable object size in kB (1 - 2147483 kb (2GB). All objects that exceed this are delivered to the client but not stored in the web cache. type: int max_ttl: description: - Maximum time an object can stay in the web cache without checking to see if it has expired on the server . type: int min_ttl: description: - Minimum time an object can stay in the web cache without checking to see if it has expired on the server . type: int neg_resp_time: description: - Time in minutes to cache negative responses or errors (0 - 4294967295). type: int reval_pnc: choices: - enable - disable description: - Enable/disable revalidation of pragma-no-cache (PNC) to address bandwidth concerns. type: str type: dict
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