fortinet.fortios.fortios_icap_profile 模块 – 在 Fortinet 的 FortiOS 和 FortiGate 中配置 ICAP 配置文件。
注意
此模块是 fortinet.fortios 集合(版本 2.3.8)的一部分。
如果您正在使用 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install fortinet.fortios。您需要进一步的要求才能使用此模块,请参阅 要求 了解详细信息。
要在剧本中使用它,请指定:fortinet.fortios.fortios_icap_profile。
fortinet.fortios 2.0.0 中的新增功能
概要
- 此模块能够通过允许用户设置和修改 icap 功能和配置文件类别来配置 FortiGate 或 FortiOS (FOS) 设备。示例包括所有参数和值,需要在使用前调整为数据源。使用 FOS v6.0.0 测试。 
要求
在执行此模块的主机上需要满足以下要求。
- ansible>=2.15 
参数
| 参数 | 注释 | 
|---|---|
| 基于令牌的身份验证。从 Fortigate 的 GUI 生成。 | |
| 启用/禁用任务的日志记录。 选择 
 | |
| 配置 ICAP 配置文件。 | |
| 启用/禁用分块封装。 选择 
 | |
| 注释。 | |
| 启用/禁用 ICAP 扩展功能。 选择 
 | |
| 配置文件传输协议,将传输的文件作为 REQMOD 传递给 ICAP 服务器。 选择 
 | |
| 在处理文件传输时,如果无法联系 ICAP 服务器,则采取的操作。 选择 
 | |
| ICAP URI 的路径组件,用于标识文件传输处理服务。 | |
| 用于文件传输的 ICAP 服务器。源 icap.server.name icap.server-group.name。 | |
| 发现感染时启用/禁用 UTM 日志。 选择 
 | |
| 配置 ICAP 转发的请求标头。 | |
| 启用/禁用 HTTP 内容的 base64 编码的使用。 选择 
 | |
| HTTP 标头内容。 | |
| HTTP 转发的标头 ID。请参阅 <a href=’#notes’>注释</a>。 | |
| HTTP 转发的标头名称。 | |
| 允许发送到 ICAP 服务器以进行进一步处理的 HTTP 方法。 选择 
 | |
| ICAP 配置文件名称。 | |
| 启用/禁用向 ICAP 服务器预览数据。 选择 
 | |
| 要发送到 ICAP 服务器的预览数据长度。 | |
| 替换消息组。源 system.replacemsg-group.name。 | |
| 启用/禁用是否将 HTTP 请求传递到 ICAP 服务器。 选择 
 | |
| 在处理 HTTP 请求时,如果无法联系 ICAP 服务器,则采取的操作。 选择 
 | |
| ICAP URI 的路径组件,用于标识 HTTP 请求处理服务。 | |
| 用于 HTTP 请求的 ICAP 服务器。源 icap.server.name icap.server-group.name。 | |
| ICAP 响应修改 (respmod) 处理的默认操作。 选择 
 | |
| ICAP 响应模式转发规则。 | |
| 对 ICAP 服务器执行的操作。 选择 
 | |
| HTTP 标头组。 | |
| 启用/禁用匹配标头时的大小写敏感性。 选择 
 | |
| HTTP 标头正则表达式。 | |
| HTTP 标头。 | |
| ID。请参阅 <a href=’#notes’>注释</a>。 | |
| 主机的地址对象。源 firewall.address.name firewall.addrgrp.name firewall.proxy-address.name。 | |
| HTTP 响应状态代码。 | |
| HTTP 响应状态代码。请参阅 <a href=’#notes’>注释</a>。 | |
| 地址名称。 | |
| 启用/禁用是否将 HTTP 响应传递到 ICAP 服务器。 选择 
 | |
| 启用/禁用允许 ICAP 服务器返回 204 响应。 选择 
 | |
| 在处理 HTTP 响应时,如果无法联系 ICAP 服务器,则采取的操作。 选择 
 | |
| ICAP URI 的路径组件,用于标识 HTTP 响应处理服务。 | |
| 启用/禁用为 ICAP 响应修改 (respmod) 处理添加 req-hdr。 选择 
 | |
| 用于 HTTP 响应的 ICAP 服务器。源 icap.server.name icap.server-group.name。 | |
| 扫描进度间隔值。 | |
| ICAP 客户端保存的 204 响应大小限制,单位为兆字节 (1 - 10)。 | |
| 启用/禁用跳过流内容的 ICAP 服务器。 选择 
 | |
| ICAP 客户端等待来自 ICAP 服务器响应的时间(以秒为单位)。 | |
| 要操作的成员属性路径。 如果存在多个属性,则用斜杠字符分隔。 标记有 member_path 的参数对于执行成员操作是合法的。 | |
| 在指定的属性路径下添加或删除成员。 指定 member_state 时,将忽略 state 选项。 选择 
 | |
| 指示是创建还是删除对象。 选择 
 | |
| 虚拟域,在先前定义的那些之中。vdom是FortiGate的一个虚拟实例,可以配置并用作不同的单元。 默认值:  | 
备注
注意
- 旧的 fortiosapi 已被弃用,httpapi 是运行剧本的首选方式 
- 该模块支持 check_mode。 
示例
- name: Configure ICAP profiles.
  fortinet.fortios.fortios_icap_profile:
      vdom: "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      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: "<your_own_value>"
          file_transfer_server: "<your_own_value> (source icap.server.name icap.server-group.name)"
          icap_block_log: "disable"
          icap_headers:
              -
                  base64_encoding: "disable"
                  content: "<your_own_value>"
                  id: "16"
                  name: "default_name_17"
          methods: "delete"
          name: "default_name_19"
          preview: "disable"
          preview_data_length: "0"
          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 icap.server-group.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: "34"
                  host: "myhostname (source firewall.address.name firewall.addrgrp.name firewall.proxy-address.name)"
                  http_resp_status_code:
                      -
                          code: "<you_own_value>"
                  name: "default_name_38"
          response: "disable"
          response_failure: "error"
          response_path: "<your_own_value>"
          response_req_hdr: "disable"
          response_server: "<your_own_value> (source icap.server.name icap.server-group.name)"
          scan_progress_interval: "10"
          streaming_content_bypass: "disable"
          timeout: "30"
返回值
常见的返回值已在此处记录 此处,以下是此模块独有的字段
| 键 | 描述 | 
|---|---|
| FortiGate 镜像的构建版本号 返回值: 总是 示例:  | |
| 最后一次用于将内容配置到 FortiGate 的方法 返回值: 总是 示例:  | |
| FortiGate 在上次操作中给出的最后结果 返回值: 总是 示例:  | |
| 上次调用 FortiGate 时使用的主键 (id) 返回值: 成功 示例:  | |
| 用于满足请求的表的名称 返回值: 总是 示例:  | |
| 用于满足请求的表的路径 返回值: 总是 示例:  | |
| 内部修订号 返回值: 总是 示例:  | |
| 设备的序列号 返回值: 总是 示例:  | |
| 操作结果的指示 返回值: 总是 示例:  | |
| 使用的虚拟域 返回值: 总是 示例:  | |
| FortiGate 的版本 返回值: 总是 示例:  | 
