fortinet.fortios.fortios_endpoint_control_profile 模块 – 在 Fortinet 的 FortiOS 和 FortiGate 中配置 FortiClient 端点控制配置文件。

注意

此模块是 fortinet.fortios 集合(版本 2.3.8)的一部分。

如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install fortinet.fortios。您需要其他要求才能使用此模块,请参阅要求了解详细信息。

要在剧本中使用它,请指定:fortinet.fortios.fortios_endpoint_control_profile

在 fortinet.fortios 2.0.0 中新增

概要

  • 此模块能够通过允许用户设置和修改 endpoint_control 功能和配置文件类别来配置 FortiGate 或 FortiOS (FOS) 设备。示例包括在使用前需要调整为数据源的所有参数和值。使用 FOS v6.0.0 进行测试

要求

执行此模块的主机上需要以下要求。

  • ansible>=2.15

参数

参数

注释

access_token

字符串

基于令牌的身份验证。从 Fortigate 的 GUI 生成。

enable_log

布尔值

启用/禁用任务的日志记录。

选项

  • false ← (默认)

  • true

endpoint_control_profile

字典

配置 FortiClient 端点控制配置文件。

description

字符串

描述。

device_groups

列表 / elements=字典

设备组。

name

字符串 / 必需

来自可用选项的设备组对象。源 user.device-group.name user.device-category.name。

forticlient_android_settings

字典

适用于 Android 平台的 FortiClient 设置。

disable_wf_when_protected

字符串

在受 FortiGate 保护时启用/禁用 FortiClient Web 类别过滤。

选项

  • "enable"

  • "disable"

forticlient_advanced_vpn

字符串

启用/禁用高级 FortiClient VPN 配置。

选项

  • "enable"

  • "disable"

forticlient_advanced_vpn_buffer

字符串

高级 FortiClient VPN 配置。

forticlient_vpn_provisioning

字符串

启用/禁用 FortiClient VPN 配置。

选项

  • "enable"

  • "disable"

forticlient_vpn_settings

列表 / elements=字典

FortiClient VPN 设置。

auth_method

字符串

身份验证方法。

选项

  • "psk"

  • "certificate"

name

字符串 / 必需

VPN 名称。

preshared_key

字符串

用于 PSK 身份验证的预共享密钥。

remote_gw

字符串

远程 VPN 网关的 IP 地址或 FQDN。

sslvpn_access_port

整数

SSL VPN 访问端口 (1 - 65535)。

sslvpn_require_certificate

字符串

启用/禁用需要 SSL VPN 客户端证书。

选项

  • "enable"

  • "disable"

type

字符串

VPN 类型(IPsec 或 SSL VPN)。

选项

  • "ipsec"

  • "ssl"

forticlient_wf

字符串

启用/禁用 FortiClient Web 过滤。

选项

  • "enable"

  • "disable"

forticlient_wf_profile

字符串

要应用的 FortiClient Web 过滤器配置文件。源 webfilter.profile.name。

forticlient_ios_settings

字典

适用于 iOS 平台的 FortiClient 设置。

client_vpn_provisioning

字符串

FortiClient VPN 配置。

选项

  • "enable"

  • "disable"

client_vpn_settings

列表 / elements=字典

FortiClient VPN 设置。

auth_method

字符串

身份验证方法。

选项

  • "psk"

  • "certificate"

name

字符串 / 必需

VPN 名称。

preshared_key

字符串

用于 PSK 身份验证的预共享密钥。

remote_gw

字符串

远程 VPN 网关的 IP 地址或 FQDN。

sslvpn_access_port

整数

SSL VPN 访问端口 (1 - 65535)。

sslvpn_require_certificate

字符串

启用/禁用需要 SSL VPN 客户端证书。

选项

  • "enable"

  • "disable"

type

字符串

VPN 类型(IPsec 或 SSL VPN)。

选项

  • "ipsec"

  • "ssl"

vpn_configuration_content

字符串

VPN 配置的内容。

vpn_configuration_name

字符串

VPN 配置的名称。

configuration_content

字符串

配置文件的内容。

configuration_name

字符串

配置文件的名称。

disable_wf_when_protected

字符串

在受 FortiGate 保护时启用/禁用 FortiClient Web 类别过滤。

选项

  • "enable"

  • "disable"

distribute_configuration_profile

字符串

启用/禁用配置文件(.mobileconfig 文件)分发。

选项

  • "enable"

  • "disable"

forticlient_wf

字符串

启用/禁用 FortiClient Web 过滤。

选项

  • "enable"

  • "disable"

forticlient_wf_profile

字符串

要应用的 FortiClient Web 过滤器配置文件。源 webfilter.profile.name。

forticlient_winmac_settings

字典

适用于 Windows/Mac 平台的 FortiClient 设置。

av_realtime_protection

字符串

启用/禁用 FortiClient 防病毒实时保护。

选项

  • "enable"

  • "disable"

av_signature_up_to_date

字符串

启用/禁用 FortiClient AV 签名更新。

选项

  • "enable"

  • "disable"

forticlient_application_firewall

字符串

启用/禁用 FortiClient 应用程序防火墙。

选项

  • "enable"

  • "disable"

forticlient_application_firewall_list

字符串

FortiClient 应用程序防火墙规则列表。源 application.list.name。

forticlient_av

字符串

启用/禁用 FortiClient 防病毒扫描。

选项

  • "enable"

  • "disable"

forticlient_ems_compliance

字符串

启用/禁用 FortiClient 企业管理服务器 (EMS) 合规性。

选项

  • "enable"

  • "disable"

forticlient_ems_compliance_action

字符串

FortiClient EMS 合规性操作。

选项

  • "block"

  • "warning"

forticlient_ems_entries

列表 / elements=字典

FortiClient EMS 条目。

name

字符串 / 必需

FortiClient EMS 名称。源 endpoint-control.forticlient-ems.name。

forticlient_linux_ver

字符串

最低 FortiClient Linux 版本。

forticlient_log_upload

字符串

启用/禁用上传 FortiClient 日志。

选项

  • "enable"

  • "disable"

forticlient_log_upload_level

字符串

选择要上传的 FortiClient 日志。

选项

  • "traffic"

  • "vulnerability"

  • "event"

forticlient_log_upload_server

字符串

要上传 FortiClient 日志的服务器的 IP 地址或 FQDN。

forticlient_mac_ver

字符串

最低 FortiClient Mac OS 版本。

forticlient_minimum_software_version

字符串

启用/禁用要求客户端使用最低软件版本号运行 FortiClient。

选项

  • "enable"

  • "disable"

forticlient_operating_system

列表 / elements=字典

FortiClient 操作系统。

id

整数 / 必需

操作系统条目 ID。请参阅 <a href=’#notes’>备注</a>。

os_name

字符串

自定义操作系统名称或 Mac OS 格式:x.x.x

os_type

字符串

操作系统类型。

选项

  • "custom"

  • "mac-os"

  • "win-7"

  • "win-80"

  • "win-81"

  • "win-10"

  • "win-2000"

  • "win-home-svr"

  • "win-svr-10"

  • "win-svr-2003"

  • "win-svr-2003-r2"

  • "win-svr-2008"

  • "win-svr-2008-r2"

  • "win-svr-2012"

  • "win-svr-2012-r2"

  • "win-sto-svr-2003"

  • "win-vista"

  • "win-xp"

  • "ubuntu-linux"

  • "centos-linux"

  • "redhat-linux"

  • "fedora-linux"

forticlient_own_file

列表 / elements=字典

检查 FortiClient 应用程序的路径和文件名。

file

字符串

文件路径和名称。

id

整数 / 必需

文件 ID。请参阅 <a href=’#notes’>备注</a>。

forticlient_registration_compliance_action

字符串

FortiClient 注册合规性操作。

选项

  • "block"

  • "warning"

forticlient_registry_entry

列表 / elements=字典

FortiClient 注册表条目。

id

整数 / 必需

注册表条目 ID。请参阅 <a href=’#notes’>注释</a>。

registry_entry

字符串

注册表条目。

forticlient_running_app

列表 / elements=字典

使用 FortiClient 验证客户端上是否正在运行列出的应用程序。

app_name

字符串

应用程序名称。

app_sha256_signature

字符串

应用程序的 SHA256 签名。

app_sha256_signature2

字符串

应用程序的 SHA256 签名。

app_sha256_signature3

字符串

应用程序的 SHA256 签名。

app_sha256_signature4

字符串

应用程序的 SHA256 签名。

application_check_rule

字符串

应用程序检查规则。

选项

  • "present"

  • "absent"

id

整数 / 必需

应用程序 ID。请参阅 <a href=’#notes’>注释</a>。

process_name

字符串

进程名称。

process_name2

字符串

进程名称。

process_name3

字符串

进程名称。

process_name4

字符串

进程名称。

forticlient_security_posture

字符串

启用/禁用 FortiClient 安全态势检查选项。

选项

  • "enable"

  • "disable"

forticlient_security_posture_compliance_action

字符串

FortiClient 安全态势合规操作。

选项

  • "block"

  • "warning"

forticlient_system_compliance

字符串

启用/禁用 FortiClient 系统合规性强制。

选项

  • "enable"

  • "disable"

forticlient_system_compliance_action

字符串

阻止或警告不符合 FortiClient 要求的客户端。

选项

  • "block"

  • "warning"

forticlient_vuln_scan

字符串

启用/禁用 FortiClient 漏洞扫描。

选项

  • "enable"

  • "disable"

forticlient_vuln_scan_compliance_action

字符串

FortiClient 漏洞合规操作。

选项

  • "block"

  • "warning"

forticlient_vuln_scan_enforce

字符串

配置导致 FortiClient 漏洞合规操作的漏洞级别。

选项

  • "critical"

  • "high"

  • "medium"

  • "low"

  • "info"

forticlient_vuln_scan_enforce_grace

整数

FortiClient 漏洞扫描强制宽限期(0-30 天)。

forticlient_vuln_scan_exempt

字符串

启用/禁用无法自动修补的漏洞的合规性豁免。

选项

  • "enable"

  • "disable"

forticlient_wf

字符串

启用/禁用 FortiClient Web 过滤。

选项

  • "enable"

  • "disable"

forticlient_wf_profile

字符串

要应用的 FortiClient Web 过滤器配置文件。源 webfilter.profile.name。

forticlient_win_ver

字符串

最低 FortiClient Windows 版本。

os_av_software_installed

字符串

启用/禁用检查操作系统识别的防病毒软件。

选项

  • "enable"

  • "disable"

sandbox_address

字符串

FortiSandbox 地址。

sandbox_analysis

字符串

启用/禁用将文件发送到 FortiSandbox 进行分析。

选项

  • "enable"

  • "disable"

on_net_addr

列表 / elements=字典

用于网络内检测的地址。

name

字符串 / 必需

来自可用选项的地址对象。源 firewall.address.name firewall.addrgrp.name。

profile_name

字符串 / 必需

配置文件名称。

replacemsg_override_group

字符串

从可用选项中选择一个端点控制替换消息覆盖组。源 system.replacemsg-group.name。

src_addr

列表 / elements=字典

源地址。

name

字符串 / 必需

来自可用选项的地址对象。源 firewall.address.name firewall.addrgrp.name。

user_groups

列表 / elements=字典

用户组。

name

字符串 / 必需

用户组名称。源 user.group.name。

users

列表 / elements=字典

用户。

name

字符串 / 必需

用户名。源 user.local.name。

member_path

字符串

要操作的成员属性路径。

如果存在多个属性,则用斜杠字符分隔。

标记有 member_path 的参数对于执行成员操作是合法的。

member_state

字符串

在指定的属性路径下添加或删除成员。

当指定 member_state 时,将忽略 state 选项。

选项

  • "present"

  • "absent"

state

字符串 / 必需

指示是创建还是删除对象。

选项

  • "present"

  • "absent"

vdom

字符串

虚拟域,在之前定义的那些中。vdom 是 FortiGate 的虚拟实例,可以将其配置为不同的单元并使用。

默认值: "root"

注释

注意

  • 遗留的 fortiosapi 已被弃用,httpapi 是运行 playbook 的首选方式

  • 该模块支持 check_mode。

示例

- name: Configure FortiClient endpoint control profiles.
  fortinet.fortios.fortios_endpoint_control_profile:
      vdom: "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      endpoint_control_profile:
          description: "<your_own_value>"
          device_groups:
              -
                  name: "default_name_5 (source user.device-group.name user.device-category.name)"
          forticlient_android_settings:
              disable_wf_when_protected: "enable"
              forticlient_advanced_vpn: "enable"
              forticlient_advanced_vpn_buffer: "<your_own_value>"
              forticlient_vpn_provisioning: "enable"
              forticlient_vpn_settings:
                  -
                      auth_method: "psk"
                      name: "default_name_13"
                      preshared_key: "<your_own_value>"
                      remote_gw: "<your_own_value>"
                      sslvpn_access_port: "32767"
                      sslvpn_require_certificate: "enable"
                      type: "ipsec"
              forticlient_wf: "enable"
              forticlient_wf_profile: "<your_own_value> (source webfilter.profile.name)"
          forticlient_ios_settings:
              client_vpn_provisioning: "enable"
              client_vpn_settings:
                  -
                      auth_method: "psk"
                      name: "default_name_25"
                      preshared_key: "<your_own_value>"
                      remote_gw: "<your_own_value>"
                      sslvpn_access_port: "32767"
                      sslvpn_require_certificate: "enable"
                      type: "ipsec"
                      vpn_configuration_content: "<your_own_value>"
                      vpn_configuration_name: "<your_own_value>"
              configuration_content: "<your_own_value>"
              configuration_name: "<your_own_value>"
              disable_wf_when_protected: "enable"
              distribute_configuration_profile: "enable"
              forticlient_wf: "enable"
              forticlient_wf_profile: "<your_own_value> (source webfilter.profile.name)"
          forticlient_winmac_settings:
              av_realtime_protection: "enable"
              av_signature_up_to_date: "enable"
              forticlient_application_firewall: "enable"
              forticlient_application_firewall_list: "<your_own_value> (source application.list.name)"
              forticlient_av: "enable"
              forticlient_ems_compliance: "enable"
              forticlient_ems_compliance_action: "block"
              forticlient_ems_entries:
                  -
                      name: "default_name_48 (source endpoint-control.forticlient-ems.name)"
              forticlient_linux_ver: "<your_own_value>"
              forticlient_log_upload: "enable"
              forticlient_log_upload_level: "traffic"
              forticlient_log_upload_server: "<your_own_value>"
              forticlient_mac_ver: "<your_own_value>"
              forticlient_minimum_software_version: "enable"
              forticlient_operating_system:
                  -
                      id: "56"
                      os_name: "<your_own_value>"
                      os_type: "custom"
              forticlient_own_file:
                  -
                      file: "<your_own_value>"
                      id: "61"
              forticlient_registration_compliance_action: "block"
              forticlient_registry_entry:
                  -
                      id: "64"
                      registry_entry: "<your_own_value>"
              forticlient_running_app:
                  -
                      app_name: "<your_own_value>"
                      app_sha256_signature: "<your_own_value>"
                      app_sha256_signature2: "<your_own_value>"
                      app_sha256_signature3: "<your_own_value>"
                      app_sha256_signature4: "<your_own_value>"
                      application_check_rule: "present"
                      id: "73"
                      process_name: "<your_own_value>"
                      process_name2: "<your_own_value>"
                      process_name3: "<your_own_value>"
                      process_name4: "<your_own_value>"
              forticlient_security_posture: "enable"
              forticlient_security_posture_compliance_action: "block"
              forticlient_system_compliance: "enable"
              forticlient_system_compliance_action: "block"
              forticlient_vuln_scan: "enable"
              forticlient_vuln_scan_compliance_action: "block"
              forticlient_vuln_scan_enforce: "critical"
              forticlient_vuln_scan_enforce_grace: "15"
              forticlient_vuln_scan_exempt: "enable"
              forticlient_wf: "enable"
              forticlient_wf_profile: "<your_own_value> (source webfilter.profile.name)"
              forticlient_win_ver: "<your_own_value>"
              os_av_software_installed: "enable"
              sandbox_address: "<your_own_value>"
              sandbox_analysis: "enable"
          on_net_addr:
              -
                  name: "default_name_94 (source firewall.address.name firewall.addrgrp.name)"
          profile_name: "<your_own_value>"
          replacemsg_override_group: "<your_own_value> (source system.replacemsg-group.name)"
          src_addr:
              -
                  name: "default_name_98 (source firewall.address.name firewall.addrgrp.name)"
          user_groups:
              -
                  name: "default_name_100 (source user.group.name)"
          users:
              -
                  name: "default_name_102 (source user.local.name)"

返回值

通用返回值在此处记录 此处,以下是此模块独有的字段

描述

build

字符串

FortiGate 镜像的构建编号

返回值: 始终

示例: "1547"

http_method

字符串

用于将内容配置到 FortiGate 的最后使用的方法

返回值: 始终

示例: "PUT"

http_status

字符串

FortiGate 在上次应用的操作中给出的最后结果

返回值: 始终

示例: "200"

mkey

字符串

上次调用 FortiGate 时使用的主密钥 (id)

返回值: 成功

示例: "id"

name

字符串

用于满足请求的表名称

返回值: 始终

示例: "urlfilter"

path

字符串

用于满足请求的表的路径

返回值: 始终

示例: "webfilter"

revision

字符串

内部修订号

返回值: 始终

示例: "17.0.2.10658"

serial

字符串

设备的序列号

返回值: 始终

示例: "FGVMEVYYQT3AB5352"

status

字符串

操作结果的指示

返回值: 始终

示例: "success"

vdom

字符串

使用的虚拟域

返回值: 始终

示例: "root"

version

字符串

FortiGate 的版本

返回值: 始终

示例: "v5.6.3"

作者

  • Link Zheng (@chillancezen)

  • Jie Xue (@JieX19)

  • Hongbin Lu (@fgtdev-hblu)

  • Frank Shen (@frankshen01)

  • Miguel Angel Munoz (@mamunozgonzalez)

  • Nicolas Thomas (@thomnico)