:source: fortios_icap_profile.py
:orphan:
.. fortios_icap_profile:
fortios_icap_profile -- Configure ICAP profiles in Fortinet's FortiOS and FortiGate.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.. versionadded:: 2.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify icap 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 -> v7.6.6
Parameters
----------
.. raw:: html
- 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
- icap_profile - Configure ICAP profiles. type: dict
more...
| Supported Version Ranges |
| icap_profile |
v6.0.0 -> 7.6.6 |
- response_204 - Enable/disable allowance of 204 response from ICAP server. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| response_204 |
v7.2.0 -> 7.6.6 |
| [disable] |
v7.2.0 -> 7.6.6 |
| [enable] |
v7.2.0 -> 7.6.6 |
- size_limit_204 - 204 response size limit to be saved by ICAP client in megabytes (1 - 10). type: int
more...
|
Supported Version Ranges |
| size_limit_204 |
v7.2.0 -> 7.6.6 |
- chunk_encap - Enable/disable chunked encapsulation . type: str choices: disable, enable
more...
|
Supported Version Ranges |
| chunk_encap |
v7.0.2 -> 7.6.6 |
| [disable] |
v7.0.2 -> 7.6.6 |
| [enable] |
v7.0.2 -> 7.6.6 |
- comment - Comment. type: str
more...
|
Supported Version Ranges |
| comment |
v7.2.4 -> 7.6.6 |
- extension_feature - Enable/disable ICAP extension features. type: list choices: scan-progress
more...
|
Supported Version Ranges |
| extension_feature |
v7.0.2 -> 7.6.6 |
| [scan-progress] |
v7.0.2 -> 7.6.6 |
- file_transfer - Configure the file transfer protocols to pass transferred files to an ICAP server as REQMOD. type: list choices: ssh, ftp
more...
|
Supported Version Ranges |
| file_transfer |
v7.2.0 -> 7.6.6 |
| [ssh] |
v7.2.0 -> 7.6.6 |
| [ftp] |
v7.2.0 -> 7.6.6 |
- file_transfer_failure - Action to take if the ICAP server cannot be contacted when processing a file transfer. type: str choices: error, bypass
more...
|
Supported Version Ranges |
| file_transfer_failure |
v7.2.0 -> 7.6.6 |
| [error] |
v7.2.0 -> 7.6.6 |
| [bypass] |
v7.2.0 -> 7.6.6 |
- file_transfer_path - Path component of the ICAP URI that identifies the file transfer processing service. type: str
more...
|
Supported Version Ranges |
| file_transfer_path |
v7.2.0 -> 7.6.6 |
- file_transfer_server - ICAP server to use for a file transfer. Source icap.server.name icap.server-group.name. type: str
more...
|
Supported Version Ranges |
| file_transfer_server |
v7.2.0 -> 7.6.6 |
- icap_block_log - Enable/disable UTM log when infection found . type: str choices: disable, enable
more...
|
Supported Version Ranges |
| icap_block_log |
v7.0.1 -> 7.6.6 |
| [disable] |
v7.0.1 -> 7.6.6 |
| [enable] |
v7.0.1 -> 7.6.6 |
- icap_headers - Configure ICAP forwarded request headers. type: list member_path: icap_headers:id
more...
| Supported Version Ranges |
| icap_headers |
v6.2.0 -> 7.6.6 |
- base64_encoding - Enable/disable use of base64 encoding of HTTP content. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| base64_encoding |
v6.2.0 -> 7.6.6 |
| [disable] |
v6.2.0 -> 7.6.6 |
| [enable] |
v6.2.0 -> 7.6.6 |
- content - HTTP header content. type: str
more...
|
Supported Version Ranges |
| content |
v6.2.0 -> 7.6.6 |
- id - HTTP forwarded header ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.2.0 -> 7.6.6 |
- name - HTTP forwarded header name. type: str
more...
|
Supported Version Ranges |
| name |
v6.2.0 -> 7.6.6 |
- methods - The allowed HTTP methods that will be sent to ICAP server for further processing. type: list choices: delete, get, head, options, post, put, trace, connect, other
more...
|
Supported Version Ranges |
| methods |
v6.0.0 -> 7.6.6 |
| [delete] |
v6.0.0 -> 7.6.6 |
| [get] |
v6.0.0 -> 7.6.6 |
| [head] |
v6.0.0 -> 7.6.6 |
| [options] |
v6.0.0 -> 7.6.6 |
| [post] |
v6.0.0 -> 7.6.6 |
| [put] |
v6.0.0 -> 7.6.6 |
| [trace] |
v6.0.0 -> 7.6.6 |
| [connect] |
v7.2.0 -> 7.6.6 |
| [other] |
v6.0.0 -> 7.6.6 |
- name - ICAP profile name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.0.0 -> 7.6.6 |
- ocr_only - Enable/disable this FortiGate unit to submit only OCR interested content to the ICAP server. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| ocr_only |
v7.6.1 -> 7.6.6 |
| [disable] |
v7.6.1 -> 7.6.6 |
| [enable] |
v7.6.1 -> 7.6.6 |
- preview - Enable/disable preview of data to ICAP server. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| preview |
v6.2.0 -> 7.6.6 |
| [disable] |
v6.2.0 -> 7.6.6 |
| [enable] |
v6.2.0 -> 7.6.6 |
- preview_data_length - Preview data length to be sent to ICAP server. type: int
more...
|
Supported Version Ranges |
| preview_data_length |
v6.2.0 -> 7.6.6 |
- replacemsg_group - Replacement message group. Source system.replacemsg-group.name. type: str
more...
|
Supported Version Ranges |
| replacemsg_group |
v6.0.0 -> 7.6.6 |
- request - Enable/disable whether an HTTP request is passed to an ICAP server. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| request |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
- request_failure - Action to take if the ICAP server cannot be contacted when processing an HTTP request. type: str choices: error, bypass
more...
|
Supported Version Ranges |
| request_failure |
v6.0.0 -> 7.6.6 |
| [error] |
v6.0.0 -> 7.6.6 |
| [bypass] |
v6.0.0 -> 7.6.6 |
- request_path - Path component of the ICAP URI that identifies the HTTP request processing service. type: str
more...
|
Supported Version Ranges |
| request_path |
v6.0.0 -> 7.6.6 |
- request_server - ICAP server to use for an HTTP request. Source icap.server.name icap.server-group.name. type: str
more...
|
Supported Version Ranges |
| request_server |
v6.0.0 -> 7.6.6 |
- respmod_default_action - Default action to ICAP response modification (respmod) processing. type: str choices: forward, bypass
more...
|
Supported Version Ranges |
| respmod_default_action |
v6.4.0 -> 7.6.6 |
| [forward] |
v6.4.0 -> 7.6.6 |
| [bypass] |
v6.4.0 -> 7.6.6 |
- respmod_forward_rules - ICAP response mode forward rules. type: list member_path: respmod_forward_rules:name
more...
| Supported Version Ranges |
| respmod_forward_rules |
v6.4.0 -> 7.6.6 |
- action - Action to be taken for ICAP server. type: str choices: forward, bypass
more...
|
Supported Version Ranges |
| action |
v6.4.0 -> 7.6.6 |
| [forward] |
v6.4.0 -> 7.6.6 |
| [bypass] |
v6.4.0 -> 7.6.6 |
- header_group - HTTP header group. type: list member_path: respmod_forward_rules:name/header_group:id
more...
| Supported Version Ranges |
| header_group |
v6.4.0 -> 7.6.6 |
- case_sensitivity - Enable/disable case sensitivity when matching header. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| case_sensitivity |
v6.4.0 -> 7.6.6 |
| [disable] |
v6.4.0 -> 7.6.6 |
| [enable] |
v6.4.0 -> 7.6.6 |
- header - HTTP header regular expression. type: str
more...
|
Supported Version Ranges |
| header |
v6.4.0 -> 7.6.6 |
- header_name - HTTP header. type: str
more...
|
Supported Version Ranges |
| header_name |
v6.4.0 -> 7.6.6 |
- id - ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.4.0 -> 7.6.6 |
- host - Address object for the host. Source firewall.address.name firewall.addrgrp.name firewall.proxy-address.name. type: str
more...
|
Supported Version Ranges |
| host |
v6.4.0 -> 7.6.6 |
- http_resp_status_code - HTTP response status code. type: list member_path: respmod_forward_rules:name/http_resp_status_code:code
more...
| Supported Version Ranges |
| http_resp_status_code |
v6.4.0 -> 7.6.6 |
- code - HTTP response status code. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| code |
v6.4.0 -> 7.6.6 |
- name - Address name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.4.0 -> 7.6.6 |
- response - Enable/disable whether an HTTP response is passed to an ICAP server. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| response |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
- response_failure - Action to take if the ICAP server cannot be contacted when processing an HTTP response. type: str choices: error, bypass
more...
|
Supported Version Ranges |
| response_failure |
v6.0.0 -> 7.6.6 |
| [error] |
v6.0.0 -> 7.6.6 |
| [bypass] |
v6.0.0 -> 7.6.6 |
- response_path - Path component of the ICAP URI that identifies the HTTP response processing service. type: str
more...
|
Supported Version Ranges |
| response_path |
v6.0.0 -> 7.6.6 |
- response_req_hdr - Enable/disable addition of req-hdr for ICAP response modification (respmod) processing. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| response_req_hdr |
v6.2.0 -> 7.6.6 |
| [disable] |
v6.2.0 -> 7.6.6 |
| [enable] |
v6.2.0 -> 7.6.6 |
- response_server - ICAP server to use for an HTTP response. Source icap.server.name icap.server-group.name. type: str
more...
|
Supported Version Ranges |
| response_server |
v6.0.0 -> 7.6.6 |
- scan_progress_interval - Scan progress interval value. type: int
more...
|
Supported Version Ranges |
| scan_progress_interval |
v7.0.2 -> 7.6.6 |
- streaming_content_bypass - Enable/disable bypassing of ICAP server for streaming content. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| streaming_content_bypass |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
- timeout - Time (in seconds) that ICAP client waits for the response from ICAP server. type: int
more...
|
Supported Version Ranges |
| timeout |
v7.2.0 -> 7.6.6 |
Notes
-----
.. note::
- Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
- The module supports check_mode.
Examples
--------
.. code-block:: yaml+jinja
- name: Configure ICAP profiles.
fortinet.fortios.fortios_icap_profile:
vdom: "{{ vdom }}"
state: "present"
access_token: ""
icap_profile:
response_204: "disable"
size_limit_204: "1"
chunk_encap: "disable"
comment: "Comment."
extension_feature: "scan-progress"
file_transfer: "ssh"
file_transfer_failure: "error"
file_transfer_path: ""
file_transfer_server: " (source icap.server.name icap.server-group.name)"
icap_block_log: "disable"
icap_headers:
-
base64_encoding: "disable"
content: ""
id: "16"
name: "default_name_17"
methods: "delete"
name: "default_name_19"
ocr_only: "disable"
preview: "disable"
preview_data_length: "0"
replacemsg_group: " (source system.replacemsg-group.name)"
request: "disable"
request_failure: "error"
request_path: ""
request_server: " (source icap.server.name icap.server-group.name)"
respmod_default_action: "forward"
respmod_forward_rules:
-
action: "forward"
header_group:
-
case_sensitivity: "disable"
header: ""
header_name: ""
id: "35"
host: "myhostname (source firewall.address.name firewall.addrgrp.name firewall.proxy-address.name)"
http_resp_status_code:
-
code: ""
name: "default_name_39"
response: "disable"
response_failure: "error"
response_path: ""
response_req_hdr: "disable"
response_server: " (source icap.server.name icap.server-group.name)"
scan_progress_interval: "10"
streaming_content_bypass: "disable"
timeout: "30"
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:
.. raw:: html
- 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.