fortios_icap_profile – Configure ICAP profiles in Fortinet’s FortiOS and FortiGate.¶
New in version 2.10.
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.9.0
FortiOS Version Compatibility¶
v6.0.0 |
v6.0.5 |
v6.0.11 |
v6.2.0 |
v6.2.3 |
v6.2.5 |
v6.2.7 |
v6.4.0 |
v6.4.1 |
v6.4.4 |
v7.0.0 |
|
fortios_icap_profile | yes | yes | yes | yes | yes | yes | yes | yes | yes | yes | yes |
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
- state - Indicates whether to create or remove the object. type: str required: True choices: present, absent
- icap_profile - Configure ICAP profiles. type: dict more...
- icap_headers - Configure ICAP forwarded request headers. type: list more...
- base64_encoding - Enable/disable use of base64 encoding of HTTP content. type: str choices: disable, enable more...
- content - HTTP header content. type: str more...
- id - HTTP forwarded header ID. type: int required: True more...
- name - HTTP forwarded header name. type: str more...
- 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, other more...
- name - ICAP profile name. type: str required: True more...
- preview - Enable/disable preview of data to ICAP server. type: str choices: disable, enable more...
- preview_data_length - Preview data length to be sent to ICAP server. type: int more...
- replacemsg_group - Replacement message group. Source system.replacemsg-group.name. type: str more...
- request - Enable/disable whether an HTTP request is passed to an ICAP server. type: str choices: disable, enable more...
- request_failure - Action to take if the ICAP server cannot be contacted when processing an HTTP request. type: str choices: error, bypass more...
- request_path - Path component of the ICAP URI that identifies the HTTP request processing service. type: str more...
- request_server - ICAP server to use for an HTTP request. Source icap.server.name. type: str more...
- respmod_default_action - Default action to ICAP response modification (respmod) processing. type: str choices: forward, bypass more...
- respmod_forward_rules - ICAP response mode forward rules. type: list more...
- action - Action to be taken for ICAP server. type: str choices: forward, bypass more...
- header_group - HTTP header group. type: list more...
- case_sensitivity - Enable/disable case sensitivity when matching header. type: str choices: disable, enable more...
- header - HTTP header regular expression. type: str more...
- header_name - HTTP header. type: str more...
- id - ID. type: int required: True more...
- host - Address object for the host. Source firewall.address.name firewall.addrgrp.name firewall.proxy-address.name. type: str more...
- http_resp_status_code - HTTP response status code. type: int more...
- name - Address name. type: str required: True more...
- response - Enable/disable whether an HTTP response is passed to an ICAP server. type: str choices: disable, enable more...
- response_failure - Action to take if the ICAP server cannot be contacted when processing an HTTP response. type: str choices: error, bypass more...
- response_path - Path component of the ICAP URI that identifies the HTTP response processing service. type: str more...
- response_req_hdr - Enable/disable addition of req-hdr for ICAP response modification (respmod) processing. type: str choices: disable, enable more...
- response_server - ICAP server to use for an HTTP response. Source icap.server.name. type: str more...
- streaming_content_bypass - Enable/disable bypassing of ICAP server for streaming content. type: str choices: disable, enable more...
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 ICAP profiles.
fortios_icap_profile:
vdom: "{{ vdom }}"
state: "present"
access_token: "<your_own_value>"
icap_profile:
icap_headers:
-
base64_encoding: "disable"
content: "<your_own_value>"
id: "6"
name: "default_name_7"
methods: "delete"
name: "default_name_9"
preview: "disable"
preview_data_length: "11"
replacemsg_group: "<your_own_value> (source system.replacemsg-group.name)"
request: "disable"
request_failure: "error"
request_path: "<your_own_value>"
request_server: "<your_own_value> (source icap.server.name)"
respmod_default_action: "forward"
respmod_forward_rules:
-
action: "forward"
header_group:
-
case_sensitivity: "disable"
header: "<your_own_value>"
header_name: "<your_own_value>"
id: "24"
host: "myhostname (source firewall.address.name firewall.addrgrp.name firewall.proxy-address.name)"
http_resp_status_code:
-
code: "27"
name: "default_name_28"
response: "disable"
response_failure: "error"
response_path: "<your_own_value>"
response_req_hdr: "disable"
response_server: "<your_own_value> (source icap.server.name)"
streaming_content_bypass: "disable"
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