fortinet.fortimanager.fmgr_pkg_firewall_explicitproxypolicy 模块 – 配置显式代理策略。
注意
此模块是 fortinet.fortimanager 集合(版本 2.8.2)的一部分。
如果您正在使用 ansible 包,您可能已经安装了这个集合。 它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用: ansible-galaxy collection install fortinet.fortimanager。
要在剧本中使用它,请指定: fortinet.fortimanager.fmgr_pkg_firewall_explicitproxypolicy。
fortinet.fortimanager 2.2.0 中的新增功能
概要
- 此模块能够配置 FortiManager 设备。 
- 示例包括所有在使用前需要调整为数据源的参数和值。 
参数
| 参数 | 注释 | 
|---|---|
| 无需使用用户名和密码即可访问 FortiManager 的令牌。 | |
| 请求 URL 中的参数 (adom)。 | |
| 仅当模块模式与 FortiManager API 结构存在差异时,才设置为 True,模块将继续执行,而不验证参数。 选项 
 | |
| 启用/禁用任务日志记录。 选项 
 | |
| 使用 forticloud API 访问令牌验证 Ansible 客户端。 | |
| 请求 URL 中的参数 (pkg)。 | |
| 设置的顶层参数。 | |
| 策略操作。 选项 
 | |
| 活动身份验证方法。 选项 
 | |
| 应用程序列表。 | |
| 防病毒配置文件。 | |
| CASI 配置文件。 | |
| 评论。 | |
| Web 代理免责声明设置。 选项 
 | |
| DLP 传感器。 | |
| 目标地址名称。 | |
| IPv6 目标地址 | |
| 启用/禁用取反目标地址匹配。 选项 
 | |
| 目标接口名称。 | |
| 全局视图的标签。 | |
| ICAP 配置文件。 | |
| 启用/禁用基于身份的策略。 选项 
 | |
| 基于身份的策略。 | |
| 应用程序列表。 | |
| 防病毒配置文件。 | |
| CASI 配置文件。 | |
| Web 代理免责声明设置。 选项 
 | |
| DLP 传感器。 | |
| 组名称。 | |
| ICAP 配置文件。 | |
| ID。 | |
| IPS传感器。 | |
| 启用/禁用策略日志流量。 选项 
 | |
| 启用/禁用策略日志流量开始。 选项 
 | |
| Mms配置文件 | |
| 配置文件组 | |
| 配置文件协议选项。 | |
| 配置文件类型 选项 
 | |
| 指定身份验证替换消息覆盖组。 | |
| 启用/禁用扫描与僵尸网络服务器的连接。 选项 
 | |
| 计划名称。 | |
| 垃圾邮件过滤器配置文件。 | |
| SSL SSH 配置文件。 | |
| 用户名。 | |
| 启用 AV/Web/IPS 保护配置文件。 选项 
 | |
| Web 应用程序防火墙配置文件。 | |
| Web 过滤器配置文件。 | |
| 启用/禁用基于 IP 的身份验证。 选项 
 | |
| IPS传感器。 | |
| 部分视图的标签。 | |
| 启用/禁用策略日志流量。 选项 
 | |
| 启用/禁用策略日志流量开始。 选项 
 | |
| Mms配置文件 | |
| 策略 ID。 | |
| 配置文件组 | |
| 配置文件协议选项。 | |
| 配置文件类型 选项 
 | |
| 显式代理类型。 选项 
 | |
| 指定身份验证替换消息覆盖组。 | |
| 启用/禁用双因素身份验证的要求。 选项 
 | |
| 启用/禁用扫描与僵尸网络服务器的连接。 选项 
 | |
| 计划名称。 | |
| 服务名称。 | |
| 启用/禁用否定服务匹配。 选项 
 | |
| 垃圾邮件过滤器配置文件。 | |
| 源地址名称。 | |
| IPv6 源地址 | |
| 启用/禁用否定源地址匹配。 选项 
 | |
| SSL SSH 配置文件。 | |
| SSO 身份验证方法。 选项 
 | |
| 启用/禁用策略状态。 选项 
 | |
| 应用的对象标签。 | |
| 启用/禁用基于事务的身份验证。 选项 
 | |
| 使用客户端的 IP 地址连接到服务器。 选项 
 | |
| 启用 AV/Web/IPS 保护配置文件。 选项 
 | |
| 通用唯一标识符。 | |
| Web 应用程序防火墙配置文件。 | |
| 启用/禁用 Web 身份验证 Cookie。 选项 
 | |
| 启用/禁用 Web 缓存。 选项 
 | |
| 启用/禁用 HTTPS 的 Web 缓存。 选项 
 | |
| Web 过滤器配置文件。 | |
| Web 代理转发服务器。 | |
| Web 代理配置文件。 | |
| 覆盖底层 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 Explicit proxy policies.
      fortinet.fortimanager.fmgr_pkg_firewall_explicitproxypolicy:
        # 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>
        pkg: <your own value>
        state: present # <value in [present, absent]>
        pkg_firewall_explicitproxypolicy:
          action: <value in [deny, accept]>
          active_auth_method: <value in [ntlm, basic, digest, ...]>
          application_list: <string>
          av_profile: <string>
          casi_profile: <string>
          comments: <string>
          disclaimer: <value in [disable, domain, policy, ...]>
          dlp_sensor: <string>
          dstaddr: <string>
          dstaddr_negate: <value in [disable, enable]>
          dstaddr6: <string>
          dstintf: <string>
          global_label: <string>
          icap_profile: <string>
          identity_based: <value in [disable, enable]>
          identity_based_policy:
            -
              application_list: <string>
              av_profile: <string>
              casi_profile: <string>
              disclaimer: <value in [disable, domain, policy, ...]>
              dlp_sensor: <string>
              groups: <string>
              icap_profile: <string>
              id: <integer>
              ips_sensor: <string>
              logtraffic: <value in [disable, all, utm]>
              logtraffic_start: <value in [disable, enable]>
              mms_profile: <string>
              profile_group: <string>
              profile_protocol_options: <string>
              profile_type: <value in [single, group]>
              replacemsg_override_group: <string>
              scan_botnet_connections: <value in [disable, block, monitor]>
              schedule: <string>
              spamfilter_profile: <string>
              ssl_ssh_profile: <string>
              users: <string>
              utm_status: <value in [disable, enable]>
              waf_profile: <string>
              webfilter_profile: <string>
          ip_based: <value in [disable, enable]>
          ips_sensor: <string>
          label: <string>
          logtraffic: <value in [disable, all, utm]>
          logtraffic_start: <value in [disable, enable]>
          mms_profile: <string>
          policyid: <integer>
          profile_group: <string>
          profile_protocol_options: <string>
          profile_type: <value in [single, group]>
          proxy: <value in [web, ftp, wanopt]>
          replacemsg_override_group: <string>
          require_tfa: <value in [disable, enable]>
          scan_botnet_connections: <value in [disable, block, monitor]>
          schedule: <string>
          service: <string>
          service_negate: <value in [disable, enable]>
          spamfilter_profile: <string>
          srcaddr: <string>
          srcaddr_negate: <value in [disable, enable]>
          srcaddr6: <string>
          ssl_ssh_profile: <string>
          sso_auth_method: <value in [fsso, rsso, none]>
          status: <value in [disable, enable]>
          tags: <string>
          transaction_based: <value in [disable, enable]>
          transparent: <value in [disable, enable]>
          utm_status: <value in [disable, enable]>
          uuid: <string>
          waf_profile: <string>
          web_auth_cookie: <value in [disable, enable]>
          webcache: <value in [disable, enable]>
          webcache_https: <value in [disable, any, enable]>
          webfilter_profile: <string>
          webproxy_forward_server: <string>
          webproxy_profile: <string>
返回值
常见的返回值记录在此处,以下是此模块独有的字段
| 键 | 描述 | 
|---|---|
| 请求的结果。 返回: 总是 | |
| 请求的完整 URL。 返回: 总是 示例:  | |
| API 请求的状态。 返回: 总是 示例:  | |
| API 响应。 返回: 总是 | |
| API 响应的描述性消息。 返回: 总是 示例:  | |
| 目标系统的信息。 返回: 总是 | |
| 请求的状态。 返回: 总是 示例:  | |
| 如果 playbook 中使用的参数当前 FortiManager 版本不支持,则会发出警告。 返回: complex | 
