fortinet.fortimanager.fmgr_system_fortiguard 模块 – 配置 FortiGuard 服务。
注意
此模块是 fortinet.fortimanager 集合(版本 2.8.2)的一部分。
如果您正在使用 ansible 包,您可能已经安装了这个集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install fortinet.fortimanager。
要在 Playbook 中使用它,请指定:fortinet.fortimanager.fmgr_system_fortiguard。
fortinet.fortimanager 2.0.0 中的新增功能
概要
- 此模块能够配置 FortiManager 设备。 
- 示例包括所有参数和值,这些参数和值需要在使用前调整为数据源。 
参数
| 参数 | 注释 | 
|---|---|
| 无需使用用户名和密码即可访问 FortiManager 的令牌。 | |
| 请求的 URL 中的参数 (adom)。 | |
| 仅当模块模式与 FortiManager API 结构不同时才设置为 True,模块将继续执行而不验证参数。 选项 
 | |
| 启用/禁用任务日志记录。 选项 
 | |
| 使用 forticloud API 访问令牌验证 Ansible 客户端。 | |
| 覆盖底层 Json RPC 请求的方法。 选项 
 | |
| 将覆盖失败条件的 rc 代码列表。 | |
| 将覆盖成功条件的 rc 代码列表。 | |
| 设置的顶级参数。 | |
| 启用/禁用 FortiGuard 反垃圾邮件请求缓存。 选项 
 | |
| 反垃圾邮件缓存允许使用的 FortiGate 内存的最大百分比 | |
| 反垃圾邮件缓存允许使用的 FortiGate 内存的最大千分比 | |
| 反垃圾邮件缓存条目的生存时间(以秒为单位) | |
| 反垃圾邮件过期时间。 | |
| 启用/禁用关闭 FortiGuard 反垃圾邮件服务。 选项 
 | |
| 反垃圾邮件许可证。 | |
| 反垃圾邮件查询超时 | |
| FortiGuard 任播 DNS 评级服务器的 IP 地址。 | |
| 要连接到 FortiGuard 任播 DNS 评级服务器的端口。 | |
| 启用/禁用从 FortiGuard 自动进行补丁级固件升级。 选项 
 | |
| 允许的日期 选项 
 | |
| 日延迟 | |
| 从 FortiGuard 自动进行补丁级固件升级的指定时间窗口中的结束时间(以 24 小时制表示) | |
| 从 FortiGuard 自动进行补丁级固件升级的指定时间窗口中的开始时间(以 24 小时制表示) | |
| 自动连接并登录到 FortiCloud。 选项 
 | |
| 启用/禁用 FortiGuard 防病毒缓存。 选项 
 | |
| 防病毒缓存可以使用的最大内存百分比 | |
| 防病毒缓存条目的生存时间 | |
| 关闭 FortiGuard 防病毒服务。 选项 
 | |
| FortiGuard 防病毒合同的许可证检查之间的时间间隔。 | |
| 防病毒查询超时 | |
| FortiDDNS 服务器的 IP 地址。 | |
| FortiDDNS 服务器的 IPv6 地址。 | |
| 用于与 FortiDDNS 服务器通信的端口。 | |
| 在 FortiGuard 许可证到期前多少天生成许可证到期事件日志的阈值。 | |
| 启用/禁用 FortiGuard 的任播网络的使用。 选项 
 | |
| 配置 Fortinet 的哪个服务器在 FortiGuard 的任播网络中提供 FortiGuard 服务。 选项 
 | |
| 启用/禁用自动补丁级别固件升级建议的提示。 选项 
 | |
| 指定到达服务器的传出接口。 | |
| 指定如何选择到达服务器的传出接口。 选项 
 | |
| 作为第一个 FortiGuard 选项轮流使用的服务器数量。 | |
| 启用/禁用 FortiGuard 病毒爆发预防缓存。 选项 
 | |
| FortiGuard 病毒爆发预防缓存可以使用的最大内存百分比。 | |
| FortiGuard 病毒爆发预防缓存可以使用的最大内存千分比。 | |
| FortiGuard 病毒爆发预防缓存条目的生存时间。 | |
| 爆发预防到期时间。 | |
| 关闭 FortiGuard 病毒爆发预防服务。 选项 
 | |
| 爆发预防许可证。 | |
| FortiGuard 病毒爆发预防超时。 | |
| 启用/禁用使用持久连接接收来自 FortiGuard 的更新通知。 选项 
 | |
| 用于与 FortiGuard 服务器通信的端口。 选项 
 | |
| 用于与 FortiGuard 服务器通信的协议。 选项 
 | |
| (列表) 代理用户的密码。 | |
| 代理服务器的 IP 地址。 | |
| 用于与代理服务器通信的端口。 | |
| 代理用户名。 | |
| 启用/禁用 FortiCloud 沙箱内联扫描。 选项 
 | |
| 云沙箱区域。 | |
| FortiGuard DNS 服务的自定义选项。 选项 
 | |
| (列表) FortiDNS 服务器的 IP 地址。 | |
| 用于与 FortiDNS 服务器通信的端口。 | |
| 服务帐户 ID。 | |
| 用于与 FortiGuard 通信的源 IPv4 地址。 | |
| 用于与 FortiGuard 通信的源 IPv6 地址。 | |
| 启用/禁用代理字典重建。 选项 
 | |
| 启用/禁用 DLP 签名更新。 选项 
 | |
| 启用/禁用外部资源更新。 选项 
 | |
| 启用/禁用 Internet 服务数据库更新。 选项 
 | |
| 签名更新服务器位置。 选项 
 | |
| 启用/禁用允许列表更新。 选项 
 | |
| FortiGuard 服务的虚拟域名称。 | |
| 视频过滤器到期时间。 | |
| 视频过滤器许可证。 | |
| 启用/禁用 FortiGuard Web 过滤器缓存。 选项 
 | |
| Web 过滤器缓存条目的生存时间(秒)。 | |
| Web 过滤器到期时间。 | |
| 启用/禁用关闭 FortiGuard Web 过滤服务。 选项 
 | |
| Web 过滤器许可证。 | |
| Web 过滤器查询超时。 | |
| 在工作区模式下运行的 FortiManager 要锁定的 ADOM,该值可以是 global 和其他值,包括 root。 | |
| 等待其他用户释放工作区锁定的最大时间(秒)。 默认值:  | 
注释
注意
- 从 2.4.0 版本开始,所有输入参数都使用下划线命名约定 (snake_case) 命名。请将 “var-name” 等参数更改为 “var_name”。旧的参数名称仍然可用,但您会收到弃用警告。您可以通过在 ansible.cfg 中设置 deprecation_warnings=False 来忽略此警告。 
- 此 FortiManager 模块支持在工作区锁定模式下运行,顶层参数 workspace_locking_adom 和 workspace_locking_timeout 有助于完成这项工作。 
- 通常,当返回非零 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 FortiGuard services.
      fortinet.fortimanager.fmgr_system_fortiguard:
        # 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>
        system_fortiguard:
          antispam_cache: <value in [disable, enable]>
          antispam_cache_mpercent: <integer>
          antispam_cache_ttl: <integer>
          antispam_expiration: <integer>
          antispam_force_off: <value in [disable, enable]>
          antispam_license: <integer>
          antispam_timeout: <integer>
          auto_join_forticloud: <value in [disable, enable]>
          ddns_server_ip: <string>
          ddns_server_port: <integer>
          load_balance_servers: <integer>
          outbreak_prevention_cache: <value in [disable, enable]>
          outbreak_prevention_cache_mpercent: <integer>
          outbreak_prevention_cache_ttl: <integer>
          outbreak_prevention_expiration: <integer>
          outbreak_prevention_force_off: <value in [disable, enable]>
          outbreak_prevention_license: <integer>
          outbreak_prevention_timeout: <integer>
          port: <value in [53, 80, 8888, ...]>
          sdns_server_ip: <list or string>
          sdns_server_port: <integer>
          service_account_id: <string>
          source_ip: <string>
          source_ip6: <string>
          update_server_location: <value in [any, usa, automatic, ...]>
          webfilter_cache: <value in [disable, enable]>
          webfilter_cache_ttl: <integer>
          webfilter_expiration: <integer>
          webfilter_force_off: <value in [disable, enable]>
          webfilter_license: <integer>
          webfilter_timeout: <integer>
          protocol: <value in [udp, http, https]>
          proxy_password: <list or string>
          proxy_server_ip: <string>
          proxy_server_port: <integer>
          proxy_username: <string>
          sandbox_region: <string>
          avquery_cache_ttl: <integer>
          avquery_timeout: <integer>
          avquery_cache: <value in [disable, enable]>
          avquery_cache_mpercent: <integer>
          avquery_license: <integer>
          avquery_force_off: <value in [disable, enable]>
          fortiguard_anycast: <value in [disable, enable]>
          fortiguard_anycast_source: <value in [fortinet, aws, debug]>
          interface: <string>
          interface_select_method: <value in [auto, sdwan, specify]>
          sdns_options:
            - "include-question-section"
          anycast_sdns_server_ip: <string>
          anycast_sdns_server_port: <integer>
          persistent_connection: <value in [disable, enable]>
          update_build_proxy: <value in [disable, enable]>
          update_extdb: <value in [disable, enable]>
          update_ffdb: <value in [disable, enable]>
          update_uwdb: <value in [disable, enable]>
          videofilter_expiration: <integer>
          videofilter_license: <integer>
          ddns_server_ip6: <string>
          vdom: <string>
          auto_firmware_upgrade: <value in [disable, enable]>
          auto_firmware_upgrade_day:
            - "sunday"
            - "monday"
            - "tuesday"
            - "wednesday"
            - "thursday"
            - "friday"
            - "saturday"
          auto_firmware_upgrade_end_hour: <integer>
          auto_firmware_upgrade_start_hour: <integer>
          sandbox_inline_scan: <value in [disable, enable]>
          auto_firmware_upgrade_delay: <integer>
          gui_prompt_auto_upgrade: <value in [disable, enable]>
          FDS_license_expiring_days: <integer>
          antispam_cache_mpermille: <integer>
          outbreak_prevention_cache_mpermille: <integer>
          update_dldb: <value in [disable, enable]>
返回值
常见的返回值记录在这里,以下是此模块特有的字段
| 键 | 描述 | 
|---|---|
| 请求的结果。 返回: 始终 | |
| 请求的完整 URL。 返回: 始终 示例:  | |
| API 请求的状态。 返回: 始终 示例:  | |
| API 响应。 返回: 始终 | |
| API 响应的描述性消息。 返回: 始终 示例:  | |
| 目标系统的信息。 返回: 始终 | |
| 请求的状态。 返回: 始终 示例:  | |
| 如果 playbook 中使用的参数不受当前 FortiManager 版本支持,则发出警告。 返回: 复杂 | 
