fortinet.fortimanager.fmgr_pm_config_pblock_firewall_proxypolicy 模块 – 配置代理策略。
注意
此模块是 fortinet.fortimanager 集合 (版本 2.8.2) 的一部分。
如果您使用的是 ansible 软件包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用: ansible-galaxy collection install fortinet.fortimanager。
要在 playbook 中使用它,请指定: fortinet.fortimanager.fmgr_pm_config_pblock_firewall_proxypolicy。
fortinet.fortimanager 2.7.0 中的新增功能
概要
- 此模块能够配置 FortiManager 设备。 
- 示例包含所有需要在使用前调整为数据源的参数和值。 
参数
| 参数 | 注释 | 
|---|---|
| 无需使用用户名和密码即可访问 FortiManager 的令牌。 | |
| 请求 URL 中的参数 (adom)。 | |
| 仅当模块模式与 FortiManager API 结构差异时设置为 True,模块将继续执行而无需验证参数。 选项 
 | |
| 启用/禁用任务日志记录。 选项 
 | |
| 使用 FortiCloud API 访问令牌对 Ansible 客户端进行身份验证。 | |
| 请求 URL 中的参数 (pblock)。 | |
| 设置的顶级参数。 | |
| 分配的策略块。 | |
| IPv4 访问代理。 | |
| IPv6 访问代理。 | |
| 接受或拒绝与策略参数匹配的流量。 选项 
 | |
| 现有应用程序列表的名称。 | |
| 现有反病毒配置文件的名称。 | |
| 启用/禁用阻止通知。 选项 
 | |
| 现有 CASB 配置文件的名称。 | |
| 现有 CIFS 配置文件的名称。 | |
| 可选注释。 | |
| 解密流量镜像。 | |
| 启用/禁用在 HTTP 请求中检测 HTTPS。 选项 
 | |
| 启用后,所有权强制将在策略级别执行。 选项 
 | |
| 现有 Diameter 过滤器配置文件的名称。 | |
| Web 代理免责声明设置 选项 
 | |
| 现有 DLP 配置文件的名称。 | |
| 现有 DLP 传感器的名称。 | |
| 现有 DNS 过滤器配置文件的名称。 | |
| 目标地址对象。 | |
| IPv6 目标地址对象。 | |
| 启用后,目标地址将匹配任何地址,**除了**指定的目标地址。 选项 
 | |
| 目标接口名称。 | |
| 现有邮件过滤配置文件的名称。 | |
| 现有文件过滤配置文件的名称。 | |
| 全局基于 Web 的管理可见标签。 | |
| 组对象的名称。 | |
| 启用/禁用 HTTP 隧道认证。 选项 
 | |
| 现有 ICAP 配置文件的名称。 | |
| 启用/禁用为此策略使用互联网服务。 选项 
 | |
| 启用/禁用为此策略使用 IPv6 互联网服务。 选项 
 | |
| 自定义 IPv6 互联网服务名称。 | |
| 自定义 IPv6 互联网服务组名称。 | |
| IPv6 互联网服务组名称。 | |
| IPv6 互联网服务名称。 | |
| 启用后,互联网服务将匹配任何 IPv6 互联网服务,**除了**选定的 IPv6 互联网服务。 选项 
 | |
| 自定义互联网服务名称。 | |
| 自定义互联网服务组名称。 | |
| 互联网服务组名称。 | |
| 互联网服务 ID。 | |
| 互联网服务名称。 | |
| 启用后,互联网服务将匹配任何互联网服务,**除了**选定的互联网服务。 选项 
 | |
| 现有 IPS 传感器的名称。 | |
| 现有 VoIP 的名称 | |
| VDOM 特定的 GUI 可见标签。 | |
| 启用/禁用 HTTP 事务日志。 选项 
 | |
| 启用/禁用通过策略记录流量。 选项 
 | |
| 启用/禁用策略日志流量开始。 选项 
 | |
| 现有 MMS 配置文件的名称。 | |
| 策略名称。 | |
| 策略 ID。 | |
| IP 池对象的名称。 | |
| 配置文件组的名称。 | |
| 现有协议选项配置文件的名称。 | |
| 确定防火墙策略是否仅允许安全配置文件组或单个配置文件。 选项 
 | |
| 显式代理的类型。 选项 
 | |
| 用于进一步显式 Web 代理处理的重定向 URL。 | |
| 身份验证替换消息覆盖组。 | |
| 计划对象的名称。 | |
| 现有 SCTP 过滤配置文件的名称。 | |
| 服务对象的名称。 | |
| 启用后,服务将匹配任何服务,**除了**指定的目标服务。 选项 
 | |
| 此策略接受的会话的 TTL(秒)。 | |
| 源地址对象。 | |
| IPv6 源地址对象。 | |
| 启用后,源地址将匹配任何地址,**除了**指定的源地址。 选项 
 | |
| 源接口名称。 | |
| 现有 SSH 过滤配置文件的名称。 | |
| 将 SSH 流量重定向到匹配的透明代理策略。 选项 
 | |
| 现有 SSL SSH 配置文件的名称。 | |
| 启用/禁用策略的活动状态。 选项 
 | |
| 启用后,使用客户端的 IP 地址连接到服务器。 选项 
 | |
| 用户对象的名称。 | |
| 启用 UTM 配置文件/传感器/列表的使用。 选项 
 | |
| 通用唯一标识符 | |
| 现有 VideoFilter 配置文件的名称。 | |
| 虚拟补丁配置文件。 | |
| 现有 VoIP 配置文件的名称。 | |
| 现有 Web 应用防火墙配置文件的名称。 | |
| 启用/禁用 Web 缓存。 选项 
 | |
| 启用/禁用 HTTPS 的 Web 缓存。 选项 
 | |
| 现有 Web 过滤配置文件的名称。 | |
| Web 代理转发服务器名称。 | |
| Web 代理配置文件的名称。 | |
| ZTNA EMS 标签名称。 | |
| IPv4 ZTNA 流量转发代理。 | |
| ZTNA 标签匹配逻辑。 选项 
 | |
| 底层 Json RPC 请求的覆盖方法。 选项 
 | |
| 将覆盖失败条件的 rc 代码列表。 | |
| 将覆盖成功条件的 rc 代码列表。 | |
| 创建、更新或删除对象的指令。 选项 
 | |
| 在工作区模式下运行 FortiManager 时要锁定的 ADOM,该值可以是全局的和其他值,包括 root。 | |
| 等待其他用户释放工作区锁的最大时间(秒)。 默认值:  | 
注释
注意
- 从 2.4.0 版本开始,所有输入参数都使用下划线命名约定(snake_case)。请将诸如“var-name”之类的参数更改为“var_name”。旧的参数名称仍然可用,但您会收到弃用警告。您可以通过在 ansible.cfg 中设置 deprecation_warnings=False 来忽略此警告。 
- 此 FortiManager 模块支持在工作区锁定模式下运行,顶级参数 `workspace_locking_adom` 和 `workspace_locking_timeout` 用于实现此功能。 
- 要创建或更新对象,请使用 `state present` 指令。 
- 要删除对象,请使用 `state absent` 指令。 
- 通常情况下,如果返回非零 rc 值,则运行一个模块可能会失败。您也可以使用参数 `rc_failed` 和 `rc_succeeded` 覆盖失败或成功的条件。 
示例
- name: Example playbook (generated based on argument schema)
  hosts: fortimanagers
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Configure proxy policies.
      fortinet.fortimanager.fmgr_pm_config_pblock_firewall_proxypolicy:
        # bypass_validation: false
        workspace_locking_adom: <value in [global, custom adom including root]>
        workspace_locking_timeout: 300
        # rc_succeeded: [0, -2, -3, ...]
        # rc_failed: [-2, -3, ...]
        adom: <your own value>
        pblock: <your own value>
        state: present # <value in [present, absent]>
        pm_config_pblock_firewall_proxypolicy:
          _policy_block: <integer>
          access_proxy: <list or string>
          access_proxy6: <list or string>
          action: <value in [accept, deny, redirect]>
          application_list: <list or string>
          av_profile: <list or string>
          block_notification: <value in [disable, enable]>
          casb_profile: <list or string>
          comments: <string>
          decrypted_traffic_mirror: <list or string>
          detect_https_in_http_request: <value in [disable, enable]>
          device_ownership: <value in [disable, enable]>
          disclaimer: <value in [disable, domain, policy, ...]>
          dlp_profile: <list or string>
          dnsfilter_profile: <list or string>
          dstaddr: <list or string>
          dstaddr_negate: <value in [disable, enable]>
          dstaddr6: <list or string>
          dstintf: <list or string>
          emailfilter_profile: <list or string>
          file_filter_profile: <list or string>
          global_label: <string>
          groups: <list or string>
          http_tunnel_auth: <value in [disable, enable]>
          icap_profile: <list or string>
          internet_service: <value in [disable, enable]>
          internet_service_custom: <list or string>
          internet_service_custom_group: <list or string>
          internet_service_group: <list or string>
          internet_service_name: <list or string>
          internet_service_negate: <value in [disable, enable]>
          internet_service6: <value in [disable, enable]>
          internet_service6_custom: <list or string>
          internet_service6_custom_group: <list or string>
          internet_service6_group: <list or string>
          internet_service6_name: <list or string>
          internet_service6_negate: <value in [disable, enable]>
          ips_sensor: <list or string>
          ips_voip_filter: <list or string>
          label: <string>
          log_http_transaction: <value in [disable, enable]>
          logtraffic: <value in [disable, all, utm]>
          logtraffic_start: <value in [disable, enable]>
          name: <string>
          policyid: <integer>
          poolname: <list or string>
          profile_group: <list or string>
          profile_protocol_options: <list or string>
          profile_type: <value in [single, group]>
          proxy: <value in [explicit-web, transparent-web, ftp, ...]>
          redirect_url: <string>
          replacemsg_override_group: <list or string>
          schedule: <list or string>
          sctp_filter_profile: <list or string>
          service: <list or string>
          service_negate: <value in [disable, enable]>
          session_ttl: <string>
          srcaddr: <list or string>
          srcaddr_negate: <value in [disable, enable]>
          srcaddr6: <list or string>
          srcintf: <list or string>
          ssh_filter_profile: <list or string>
          ssh_policy_redirect: <value in [disable, enable]>
          ssl_ssh_profile: <list or string>
          status: <value in [disable, enable]>
          transparent: <value in [disable, enable]>
          users: <list or string>
          utm_status: <value in [disable, enable]>
          uuid: <string>
          videofilter_profile: <list or string>
          waf_profile: <list or string>
          webcache: <value in [disable, enable]>
          webcache_https: <value in [disable, enable]>
          webfilter_profile: <list or string>
          webproxy_forward_server: <list or string>
          webproxy_profile: <list or string>
          ztna_ems_tag: <list or string>
          ztna_proxy: <list or string>
          ztna_tags_match_logic: <value in [or, and]>
          diameter_filter_profile: <list or string>
          virtual_patch_profile: <list or string>
          voip_profile: <list or string>
          dlp_sensor: <list or string>
          cifs_profile: <list or string>
          internet_service_id: <list or string>
          mms_profile: <list or string>
返回值
常见的返回值已在 此处 记录,以下是此模块特有的字段。
| 键 | 描述 | 
|---|---|
| 请求的结果。 返回:始终 | |
| 请求的完整 URL。 返回:始终 示例:  | |
| API 请求的状态。 返回:始终 示例:  | |
| API 响应。 返回:始终 | |
| API 响应的描述性消息。 返回:始终 示例:  | |
| 目标系统的信息。 返回:始终 | |
| 请求的状态。 返回:始终 示例:  | |
| 如果剧本中使用的参数不受当前 FortiManager 版本支持,则会发出警告。 返回:复杂类型 | 
