fortinet.fortimanager.fmgr_pm_config_pblock_firewall_policy6 模块 – 配置 IPv6 策略。
注意
此模块是 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_policy6。
fortinet.fortimanager 2.2.0 中的新增功能
概要
- 此模块能够配置 FortiManager 设备。 
- 示例包含所有需要在使用前调整为数据源的参数和值。 
参数
| 参数 | 注释 | 
|---|---|
| 无需使用用户名和密码即可访问 FortiManager 的令牌。 | |
| 请求 URL 中的参数 (adom)。 | |
| 仅当模块模式与 FortiManager API 结构不同时设置为 True,模块将继续执行而无需验证参数。 选项 
 | |
| 启用/禁用任务日志记录。 选项 
 | |
| 使用 FortiCloud API 访问令牌对 Ansible 客户端进行身份验证。 | |
| 请求 URL 中的参数 (pblock)。 | |
| 设置的顶级参数。 | |
| 分配的策略块。 | |
| 策略操作 选项 
 | |
| 启用/禁用抗重放检查。 选项 
 | |
| (列表) 应用类别 ID 列表。 | |
| (列表) 应用组名称。 | |
| (列表) 应用 ID 列表。 | |
| 现有应用列表的名称。 | |
| 启用/禁用策略流量 ASIC 卸载。 选项 
 | |
| 现有反病毒配置文件的名称。 | |
| CGN 日志服务器组。 | |
| 现有 CIFS 配置文件的名称。 | |
| 注释。 | |
| (列表) 要将自定义日志字段附加到此策略的日志消息的日志字段索引号。 | |
| (列表) 可以由策略匹配的设备或设备组的名称。 | |
| 启用将数据包 DiffServ 值更改为指定的 diffservcode-forward 值。 选项 
 | |
| 启用更改数据包反向。 选项 
 | |
| 将数据包 DiffServ 更改为此值。 | |
| 更改数据包反向。 | |
| 现有 DLP 传感器的名称。 | |
| 现有 DNS 过滤配置文件的名称。 | |
| 启用 DSCP 检查。 选项 
 | |
| 启用否定的 DSCP 匹配。 选项 
 | |
| DSCP 值。 | |
| 启用 DSRI 以忽略 HTTP 服务器响应。 选项 
 | |
| (列表) 目标地址和地址组名称。 | |
| 启用时,dstaddr 指定目标地址不能是什么。 选项 
 | |
| (列表) 出站 | |
| 现有电子邮件过滤器配置文件的名称。 | |
| 如果此防火墙策略的配置发生更改,如何处理会话。 选项 
 | |
| 启用此选项可防止源 NAT 更改会话的源端口。 选项 
 | |
| (列表) FSSO 组的名称。 | |
| 在 GUI 处于全局视图模式时显示的策略标签。 | |
| (列表) 可以使用此策略进行身份验证的用户组的名称。 | |
| 重定向 HTTP 选项 
 | |
| 现有 ICAP 配置文件的名称。 | |
| 基于策略的 IPsec VPN 选项 
 | |
| 策略检查模式 选项 
 | |
| 启用此选项可为源 NAT 使用 IP 池。 选项 
 | |
| 现有 IPS 传感器的名称。 | |
| 在 GUI 处于部分视图模式时显示的策略标签。 | |
| 启用或禁用日志记录。 选项 
 | |
| 会话启动时记录日志。 选项 
 | |
| 现有 MMS 配置文件的名称。 | |
| 策略名称。 | |
| 启用/禁用源 NAT。 选项 
 | |
| 基于策略的 IPsec VPN 选项 
 | |
| 基于策略的 IPsec VPN 选项 
 | |
| 启用/禁用 UTM 网络处理器加速。 选项 
 | |
| 基于策略的 IPsec VPN 选项 
 | |
| 每个 IP 流量整形器。 | |
| 策略卸载。 选项 
 | |
| 策略 ID | |
| (列表) IP 池名称。 | |
| 配置文件组的名称。 | |
| 现有协议选项配置文件的名称。 | |
| 确定防火墙策略仅允许安全配置文件组还是单个配置文件。 选项 
 | |
| 覆盖此策略的默认替换消息组。 | |
| 启用/禁用 RADIUS 单点登录 选项 
 | |
| 计划名称。 | |
| 启用/禁用拒绝数据包的返回。 选项 
 | |
| (列表) 服务和服务组名称。 | |
| 启用时,服务指定服务不能是什么。 选项 
 | |
| 此策略接受的会话的会话 TTL(以秒为单位)。 | |
| 现有垃圾邮件过滤器配置文件的名称。 | |
| (列表) 源地址和地址组名称。 | |
| 启用时,srcaddr 指定源地址不能是什么。 选项 
 | |
| (列表) 输入 | |
| 现有 SSH 过滤器配置文件的名称。 | |
| 将 SSH 流量重定向到匹配的透明代理策略。 选项 
 | |
| 启用此选项可将解密的 SSL 流量复制到 FortiGate 接口。 选项 
 | |
| (列表) SSL 镜像接口名称。 | |
| 现有 SSL SSH 配置文件的名称。 | |
| 启用或禁用此策略。 选项 
 | |
| 接收器 TCP 最大分段大小 | |
| 发送器 TCP 最大分段大小 | |
| 启用/禁用创建不带 SYN 标志的 TCP 会话。 选项 
 | |
| 启用/禁用在 TCP 会话过期时发送 RST 数据包。 选项 
 | |
| ToS | |
| 非零位用于比较,而零位被忽略。 | |
| 启用否定 TOS 匹配。 选项 
 | |
| 反向流量整形器。 | |
| 反向流量整形器。 | |
| (列表) URL 类别 ID 列表。 | |
| (列表) 可以使用此策略进行身份验证的单个用户的名称。 | |
| 启用 AV/Web/IPS 保护配置文件。 选项 
 | |
| 通用唯一标识符 | |
| VLAN 正向用户优先级 | |
| VLAN 反向用户优先级 | |
| 设置 VLAN 过滤器。 | |
| 现有 VoIP 配置文件的名称。 | |
| 基于策略的 IPsec VPN | |
| 现有 Web 应用防火墙配置文件的名称。 | |
| 启用/禁用 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 IPv6 policies.
      fortinet.fortimanager.fmgr_pm_config_pblock_firewall_policy6:
        # 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_policy6:
          _policy_block: <integer>
          action: <value in [deny, accept, ipsec, ...]>
          anti_replay: <value in [disable, enable]>
          app_category: <list or string>
          app_group: <list or string>
          application: <list or integer>
          application_list: <string>
          auto_asic_offload: <value in [disable, enable]>
          av_profile: <string>
          cgn_log_server_grp: <string>
          cifs_profile: <string>
          comments: <string>
          custom_log_fields: <list or string>
          diffserv_forward: <value in [disable, enable]>
          diffserv_reverse: <value in [disable, enable]>
          diffservcode_forward: <string>
          diffservcode_rev: <string>
          dlp_sensor: <string>
          dnsfilter_profile: <string>
          dsri: <value in [disable, enable]>
          dstaddr: <list or string>
          dstaddr_negate: <value in [disable, enable]>
          dstintf: <list or string>
          emailfilter_profile: <string>
          firewall_session_dirty: <value in [check-all, check-new]>
          fixedport: <value in [disable, enable]>
          fsso_groups: <list or string>
          global_label: <string>
          groups: <list or string>
          http_policy_redirect: <value in [disable, enable]>
          icap_profile: <string>
          inbound: <value in [disable, enable]>
          inspection_mode: <value in [proxy, flow]>
          ippool: <value in [disable, enable]>
          ips_sensor: <string>
          label: <string>
          logtraffic: <value in [disable, enable, all, ...]>
          logtraffic_start: <value in [disable, enable]>
          mms_profile: <string>
          name: <string>
          nat: <value in [disable, enable]>
          natinbound: <value in [disable, enable]>
          natoutbound: <value in [disable, enable]>
          np_acceleration: <value in [disable, enable]>
          outbound: <value in [disable, enable]>
          per_ip_shaper: <string>
          policy_offload: <value in [disable, enable]>
          policyid: <integer>
          poolname: <list or string>
          profile_group: <string>
          profile_protocol_options: <string>
          profile_type: <value in [single, group]>
          replacemsg_override_group: <string>
          rsso: <value in [disable, enable]>
          schedule: <string>
          send_deny_packet: <value in [disable, enable]>
          service: <list or string>
          service_negate: <value in [disable, enable]>
          session_ttl: <string>
          srcaddr: <list or string>
          srcaddr_negate: <value in [disable, enable]>
          srcintf: <list or string>
          ssh_filter_profile: <string>
          ssh_policy_redirect: <value in [disable, enable]>
          ssl_mirror: <value in [disable, enable]>
          ssl_mirror_intf: <list or string>
          ssl_ssh_profile: <string>
          status: <value in [disable, enable]>
          tcp_mss_receiver: <integer>
          tcp_mss_sender: <integer>
          tcp_session_without_syn: <value in [all, data-only, disable]>
          timeout_send_rst: <value in [disable, enable]>
          tos: <string>
          tos_mask: <string>
          tos_negate: <value in [disable, enable]>
          traffic_shaper: <string>
          traffic_shaper_reverse: <string>
          url_category: <list or string>
          users: <list or string>
          utm_status: <value in [disable, enable]>
          uuid: <string>
          vlan_cos_fwd: <integer>
          vlan_cos_rev: <integer>
          vlan_filter: <string>
          voip_profile: <string>
          vpntunnel: <string>
          waf_profile: <string>
          webcache: <value in [disable, enable]>
          webcache_https: <value in [disable, enable]>
          webfilter_profile: <string>
          webproxy_forward_server: <string>
          webproxy_profile: <string>
          dscp_negate: <value in [disable, enable]>
          devices: <list or string>
          dscp_value: <string>
          spamfilter_profile: <string>
          dscp_match: <value in [disable, enable]>
返回值
常见的返回值已在 此处 记录,以下是此模块特有的字段:
| 键 | 描述 | 
|---|---|
| 请求的结果。 返回: 始终 | |
| 请求的完整 URL。 返回: 始终 示例:  | |
| API 请求的状态。 返回: 始终 示例:  | |
| API 响应。 返回: 始终 | |
| API 响应的描述性消息。 返回: 始终 示例:  | |
| 目标系统的信息。 返回: 始终 | |
| 请求的状态。 返回: 始终 示例:  | |
| 如果剧本中使用的参数不受当前 FortiManager 版本支持,则会发出警告。 返回: 复杂类型 | 
