fortinet.fortios.fortios_firewall_interface_policy6 模块 – 在 Fortinet 的 FortiOS 和 FortiGate 中配置 IPv6 接口策略。
注意
此模块是 fortinet.fortios 集合 (版本 2.3.8) 的一部分。
如果您正在使用 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install fortinet.fortios。您需要其他要求才能使用此模块,有关详细信息,请参阅 要求。
要在剧本中使用它,请指定:fortinet.fortios.fortios_firewall_interface_policy6。
fortinet.fortios 2.0.0 中的新增功能
概要
- 此模块能够通过允许用户设置和修改防火墙功能和 interface_policy6 类别来配置 FortiGate 或 FortiOS (FOS) 设备。示例包括所有参数,在使用前需要将值调整为数据源。已在 FOS v6.0.0 上测试。 
要求
执行此模块的主机需要以下要求。
- ansible>=2.15 
参数
| 参数 | 注释 | 
|---|---|
| 基于令牌的身份验证。从 FortiGate 的 GUI 生成。 | |
| 启用/禁用任务日志记录。 选项 
 | |
| 配置 IPv6 接口策略。 | |
| 策略地址类型 (IPv4 或 IPv6)。 选项 
 | |
| 应用列表名称。来源 application.list.name。 | |
| 启用/禁用应用控制。 选项 
 | |
| 反病毒配置文件。来源 antivirus.profile.name。 | |
| 启用/禁用反病毒。 选项 
 | |
| CASB 配置文件。来源 casb.profile.name。 | |
| 启用/禁用 CASB。 选项 
 | |
| 注释。 | |
| DLP 配置文件名称。来源 dlp.profile.name。 | |
| 启用/禁用 DLP。 选项 
 | |
| DLP 传感器名称。来源 dlp.sensor.name。 | |
| 启用/禁用 DLP。 选项 
 | |
| 启用/禁用 DSRI。 选项 
 | |
| IPv6 地址对象,用于将流量监控限制为发送到指定地址或范围的网络流量。 | |
| 地址名称。来源 firewall.address6.name firewall.addrgrp6.name。 | |
| 电子邮件过滤器配置文件。来源 emailfilter.profile.name。 | |
| 启用/禁用电子邮件过滤器。 选项 
 | |
| 来自可用接口的受监控接口名称。来源 system.zone.name system.interface.name。 | |
| IPS 传感器名称。来源 ips.sensor.name。 | |
| 启用/禁用 IPS。 选项 
 | |
| 标签。 | |
| 在此策略中使用的日志记录类型 (选项:all | utm | disable)。 选项 
 | |
| 策略 ID (0 - 4294967295)。参见 备注。 | |
| 启用/禁用扫描与僵尸网络服务器的连接。 选项 
 | |
| 服务名称。 | |
| 服务名称。来源 firewall.service.custom.name firewall.service.group.name。 | |
| 反垃圾邮件配置文件。来源 spamfilter.profile.name。 | |
| 启用/禁用反垃圾邮件。 选项 
 | |
| IPv6 地址对象,用于将流量监控限制为从指定地址或范围发送的网络流量。 | |
| 地址名称。来源 firewall.address6.name firewall.addrgrp6.name。 | |
| 启用/禁用此策略。 选项 
 | |
| 通用唯一标识符 (UUID;自动分配,但可以手动重置)。 | |
| Web 过滤器配置文件。来源 webfilter.profile.name。 | |
| 启用/禁用 Web 过滤。 选项 
 | |
| 要操作的成员属性路径。 如果有多个属性,则用斜杠字符分隔。 标有 member_path 的参数对于执行成员操作是合法的。 | |
| 在指定的属性路径下添加或删除成员。 指定 member_state 时,将忽略 state 选项。 选项 
 | |
| 指示是创建还是删除对象。 选项 
 | |
| 虚拟域,在之前定义的那些虚拟域中。vdom 是 FortiGate 的虚拟实例,可以将其配置并用作不同的单元。 默认值:  | 
备注
注意
- 我们强烈建议您使用您自己的值作为 policyid,而不是 0,虽然 '0' 是一个特殊的占位符,允许后端为对象分配最新的可用编号,但它确实有一些限制。请在问答中查找更多详细信息。 
- 旧版 fortiosapi 已弃用,httpapi 是运行剧本的首选方式。 
- 该模块支持 check_mode。 
示例
- name: Configure IPv6 interface policies.
  fortinet.fortios.fortios_firewall_interface_policy6:
      vdom: "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      firewall_interface_policy6:
          address_type: "ipv4"
          application_list: "<your_own_value> (source application.list.name)"
          application_list_status: "enable"
          av_profile: "<your_own_value> (source antivirus.profile.name)"
          av_profile_status: "enable"
          casb_profile: "<your_own_value> (source casb.profile.name)"
          casb_profile_status: "enable"
          comments: "<your_own_value>"
          dlp_profile: "<your_own_value> (source dlp.profile.name)"
          dlp_profile_status: "enable"
          dlp_sensor: "<your_own_value> (source dlp.sensor.name)"
          dlp_sensor_status: "enable"
          dsri: "enable"
          dstaddr6:
              -
                  name: "default_name_17 (source firewall.address6.name firewall.addrgrp6.name)"
          emailfilter_profile: "<your_own_value> (source emailfilter.profile.name)"
          emailfilter_profile_status: "enable"
          interface: "<your_own_value> (source system.zone.name system.interface.name)"
          ips_sensor: "<your_own_value> (source ips.sensor.name)"
          ips_sensor_status: "enable"
          label: "<your_own_value>"
          logtraffic: "all"
          policyid: "<you_own_value>"
          scan_botnet_connections: "disable"
          service6:
              -
                  name: "default_name_28 (source firewall.service.custom.name firewall.service.group.name)"
          spamfilter_profile: "<your_own_value> (source spamfilter.profile.name)"
          spamfilter_profile_status: "enable"
          srcaddr6:
              -
                  name: "default_name_32 (source firewall.address6.name firewall.addrgrp6.name)"
          status: "enable"
          uuid: "<your_own_value>"
          webfilter_profile: "<your_own_value> (source webfilter.profile.name)"
          webfilter_profile_status: "enable"
返回值
常见的返回值已在 此处 记录,以下是此模块独有的字段
| 键 | 描述 | 
|---|---|
| FortiGate 镜像的构建编号 已返回: 始终 示例:  | |
| 上次用于将内容置备到 FortiGate 的方法 已返回: 始终 示例:  | |
| FortiGate上最后一次操作的最终结果 已返回: 始终 示例:  | |
| 最后一次调用FortiGate时使用的主密钥 (ID) 返回: 成功 示例:  | |
| 用于满足请求的表名称 已返回: 始终 示例:  | |
| 用于满足请求的表路径 已返回: 始终 示例:  | |
| 内部修订号 已返回: 始终 示例:  | |
| 设备的序列号 已返回: 始终 示例:  | |
| 操作结果指示 已返回: 始终 示例:  | |
| 使用的虚拟域 已返回: 始终 示例:  | |
| FortiGate的版本 已返回: 始终 示例:  | 
