• 博客
  • Ansible 社区论坛
  • 文档
Ansible Logo
Ansible 社区文档
Ansible

Ansible 入门

  • Ansible 入门指南
  • 执行环境入门指南

安装、升级和配置

  • 安装指南
  • Ansible 移植指南

使用 Ansible

  • 构建 Ansible 清单
  • 使用 Ansible 命令行工具
  • 使用 Ansible playbook
  • 使用 Ansible vault 保护敏感数据
  • 使用 Ansible 模块和插件
  • 使用 Ansible 集合
  • 在 Windows 和 BSD 上使用 Ansible
  • Ansible 提示和技巧

为 Ansible 贡献代码

  • Ansible 社区指南
  • Ansible 集合贡献者指南
  • ansible-core 贡献者指南
  • 高级贡献者指南
  • Ansible 文档样式指南

扩展 Ansible

  • 开发者指南

常见的 Ansible 场景

  • 旧版公共云指南

网络自动化

  • 网络入门
  • 网络高级主题
  • 网络开发者指南

Ansible Galaxy

  • Galaxy 用户指南
  • Galaxy 开发者指南

参考和附录

  • 集合索引
    • Amazon 命名空间中的集合
    • Ansible 命名空间中的集合
    • Arista 命名空间中的集合
    • Awx 命名空间中的集合
    • Azure 命名空间中的集合
    • Check_point 命名空间中的集合
    • Chocolatey 命名空间中的集合
    • Cisco 命名空间中的集合
    • Cloud 命名空间中的集合
    • Cloudscale_ch 命名空间中的集合
    • Community 命名空间中的集合
    • Containers 命名空间中的集合
    • Cyberark 命名空间中的集合
    • Dellemc 命名空间中的集合
    • F5networks 命名空间中的集合
    • Fortinet 命名空间中的集合
      • Fortinet.Fortimanager
        • 描述
        • 插件索引
      • Fortinet.Fortios
    • Frr 命名空间中的集合
    • Gluster 命名空间中的集合
    • Google 命名空间中的集合
    • Grafana 命名空间中的集合
    • Hetzner 命名空间中的集合
    • Hpe 命名空间中的集合
    • Ibm 命名空间中的集合
    • Ieisystem 命名空间中的集合
    • Infinidat 命名空间中的集合
    • Infoblox 命名空间中的集合
    • Inspur 命名空间中的集合
    • Junipernetworks 命名空间中的集合
    • Kaytus 命名空间中的集合
    • Kubernetes 命名空间中的集合
    • Kubevirt 命名空间中的集合
    • Lowlydba 命名空间中的集合
    • Mellanox 命名空间中的集合
    • Microsoft 命名空间中的集合
    • Netapp 命名空间中的集合
    • Netapp_eseries 命名空间中的集合
    • Netbox 命名空间中的集合
    • Ngine_io 命名空间中的集合
    • Openstack 命名空间中的集合
    • Openvswitch 命名空间中的集合
    • Ovirt 命名空间中的集合
    • Purestorage 命名空间中的集合
    • Sensu 命名空间中的集合
    • Servicenow 命名空间中的集合
    • Splunk 命名空间中的集合
    • T_systems_mms 命名空间中的集合
    • Telekom_mms 命名空间中的集合
    • Theforeman 命名空间中的集合
    • Vmware 命名空间中的集合
    • Vultr 命名空间中的集合
    • Vyos 命名空间中的集合
    • Wti 命名空间中的集合
  • 所有模块和插件的索引
  • Playbook 关键字
  • 返回值
  • Ansible 配置设置
  • 控制 Ansible 的行为:优先级规则
  • YAML 语法
  • Python 3 支持
  • 解释器发现
  • 发布和维护
  • 测试策略
  • 完整性测试
  • 常见问题
  • 术语表
  • Ansible 参考:模块实用程序
  • 特殊变量
  • Red Hat Ansible Automation Platform
  • Ansible Automation Hub
  • 记录 Ansible 输出

路线图

  • Ansible 路线图
  • ansible-core 路线图




Ansible
  • 集合索引
  • Fortinet 命名空间中的集合
  • Fortinet.Fortimanager
  • fortinet.fortimanager.fmgr_pkg_footer_policy 模块 – 配置 IPv4/IPv6 策略。


fortinet.fortimanager.fmgr_pkg_footer_policy 模块 – 配置 IPv4/IPv6 策略。

注意

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

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

要安装它,请使用: ansible-galaxy collection install fortinet.fortimanager。

要在 playbook 中使用它,请指定: fortinet.fortimanager.fmgr_pkg_footer_policy。

fortinet.fortimanager 2.0.0 中的新增功能

  • 概要

  • 参数

  • 备注

  • 示例

  • 返回值

概要

  • 此模块能够配置 FortiManager 设备。

  • 示例包括所有参数和值,在使用前需要根据数据源进行调整。

参数

参数

注释

access_token

字符串

无需使用用户名和密码即可访问 FortiManager 的令牌。

bypass_validation

布尔值

仅当模块模式与 FortiManager API 结构不同时设置为 True,模块将继续执行而无需验证参数。

选项

  • false ← (默认)

  • true

enable_log

布尔值

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

选项

  • false ← (默认)

  • true

forticloud_access_token

字符串

使用 forticloud API 访问令牌对 Ansible 客户端进行身份验证。

pkg

字符串 / 必填

请求 URL 中的参数 (pkg)。

pkg_footer_policy

字典

设置的顶级参数。

_policy_block

整数

分配的策略块。

access_proxy

别名:access-proxy

任意类型

(列表) 访问代理。

action

字符串

操作。

选项

  • "deny"

  • "accept"

  • "ipsec"

  • "ssl-vpn"

  • "redirect"

  • "isolate"

active_auth_method

别名:active-auth-method

字符串

活动身份验证方法。

选项

  • "ntlm"

  • "basic"

  • "digest"

  • "form"

anti_replay

别名:anti-replay

字符串

抗重放。

选项

  • "disable"

  • "enable"

app_category

别名:app-category

任意类型

(列表或字符串) 应用类别。

app_group

别名:app-group

任意类型

(列表或字符串) 应用组。

application

任意类型

(列表) 应用。

application_charts

别名:application-charts

列表 / 元素=字符串

应用图表。

选项

  • "top10-app"

  • "top10-p2p-user"

  • "top10-media-user"

application_list

别名:application-list

字符串

应用列表。

auth_cert

别名:auth-cert

字符串

身份验证证书。

auth_method

别名:auth-method

字符串

身份验证方法。

选项

  • "basic"

  • "digest"

  • "ntlm"

  • "fsae"

  • "form"

  • "fsso"

  • "rsso"

auth_path

别名:auth-path

字符串

身份验证路径。

选项

  • "disable"

  • "enable"

auth_portal

别名:auth-portal

字符串

身份验证门户。

选项

  • "disable"

  • "enable"

auth_redirect_addr

别名:auth-redirect-addr

字符串

身份验证重定向地址。

auto_asic_offload

别名:auto-asic-offload

字符串

自动 ASIC 卸载。

选项

  • "disable"

  • "enable"

av_profile

别名:av-profile

字符串

AV 配置文件。

bandwidth

字符串

带宽。

选项

  • "disable"

  • "enable"

best_route

别名:best-route

字符串

最佳路由。

选项

  • "disable"

  • "enable"

block_notification

别名:block-notification

字符串

阻止通知。

选项

  • "disable"

  • "enable"

captive_portal_exempt

别名:captive-portal-exempt

字符串

免受网络钓鱼攻击。

选项

  • "disable"

  • "enable"

capture_packet

别名:capture-packet

字符串

捕获数据包。

选项

  • "disable"

  • "enable"

casb_profile

别名: casb-profile

字符串

现有 CASB 配置文件的名称。

casi_profile

别名: casi-profile

任意类型

(列表或字符串) Casi 配置文件。

central_nat

别名: central-nat

字符串

中央 NAT。

选项

  • "disable"

  • "enable"

cgn_eif

别名: cgn-eif

字符串

启用/禁用 CGN 端点独立过滤。

选项

  • "disable"

  • "enable"

cgn_eim

别名: cgn-eim

字符串

启用/禁用 CGN 端点独立映射。

选项

  • "disable"

  • "enable"

cgn_log_server_grp

别名: cgn-log-server-grp

任意类型

(列表或字符串) NP 日志服务器组名称。

cgn_resource_quota

别名: cgn-resource-quota

整数

资源配额。

cgn_session_quota

别名: cgn-session-quota

整数

会话配额。

cgn_sw_eif_ctrl

别名: cgn-sw-eif-ctrl

字符串

启用/禁用软件端点独立过滤控制。

选项

  • "disable"

  • "enable"

cifs_profile

别名: cifs-profile

字符串

CIFS 配置文件。

client_reputation

别名: client-reputation

字符串

客户端信誉。

选项

  • "disable"

  • "enable"

client_reputation_mode

别名: client-reputation-mode

字符串

客户端信誉模式。

选项

  • "学习"

  • "监控"

注释

任意类型

(字典或字符串) 注释。

custom_log_fields

别名: custom-log-fields

任意类型

(列表或字符串) 自定义日志字段。

decrypted_traffic_mirror

别名: decrypted-traffic-mirror

字符串

解密流量镜像。

deep_inspection_options

别名: deep-inspection-options

任意类型

(列表或字符串) 深度检测选项。

delay_tcp_npu_session

别名: delay-tcp-npu-session

字符串

延迟 TCP NPU 会话。

选项

  • "disable"

  • "enable"

delay_tcp_npu_sessoin

别名: delay-tcp-npu-sessoin

字符串

延迟 TCP NPU 会话。

选项

  • "disable"

  • "enable"

detect_https_in_http_request

别名: detect-https-in-http-request

字符串

检测 HTTP 请求中的 HTTPS。

选项

  • "disable"

  • "enable"

device_detection_portal

别名: device-detection-portal

字符串

设备检测门户。

选项

  • "disable"

  • "enable"

device_ownership

别名: device-ownership

字符串

设备所有权。

选项

  • "disable"

  • "enable"

设备

任意类型

(列表或字符串) 设备。

diameter_filter_profile

别名: diameter-filter-profile

字符串

现有 Diameter 过滤配置文件的名称。

diffserv_copy

别名: diffserv-copy

字符串

启用将数据包 DiffServ 值从会话的原始方向复制到其回复方向。

选项

  • "disable"

  • "enable"

diffserv_forward

别名: diffserv-forward

字符串

Diffserv 正向。

选项

  • "disable"

  • "enable"

diffserv_reverse

别名: diffserv-reverse

字符串

Diffserv 反向。

选项

  • "disable"

  • "enable"

diffservcode_forward

别名: diffservcode-forward

字符串

Diffservcode 正向。

diffservcode_rev

别名: diffservcode-rev

字符串

Diffservcode 反向。

免责声明

字符串

免责声明。

选项

  • "disable"

  • "enable"

  • "用户"

  • "域"

  • "策略"

dlp_profile

别名: dlp-profile

字符串

现有 DLP 配置文件的名称。

dlp_sensor

别名: dlp-sensor

任意类型

(列表或字符串) DLP 传感器。

dnsfilter_profile

别名: dnsfilter-profile

字符串

DNS 过滤配置文件。

dponly

字符串

仅 DPO。

选项

  • "disable"

  • "enable"

dscp_match

别名: dscp-match

字符串

DSCP 匹配。

选项

  • "disable"

  • "enable"

dscp_negate

别名: dscp-negate

字符串

DSCP 取反。

选项

  • "disable"

  • "enable"

dscp_value

别名: dscp-value

字符串

DSCP 值。

dsri

字符串

DSRI。

选项

  • "disable"

  • "enable"

dstaddr

任意类型

(列表或字符串) 目的地址。

dstaddr6

任意类型

(列表或字符串) IPv6 目的地址。

dstaddr6_negate

别名: dstaddr6-negate

字符串

启用时,dstaddr6 指定目的地址不能是什么。

选项

  • "disable"

  • "enable"

dstaddr_negate

别名: dstaddr-negate

字符串

目的地址取反。

选项

  • "disable"

  • "enable"

dstintf

任意类型

(列表或字符串) 目的接口。

dynamic_bypass

别名: dynamic-bypass

字符串

动态旁路。

选项

  • "disable"

  • "enable"

dynamic_profile

别名: dynamic-profile

字符串

动态配置文件。

选项

  • "disable"

  • "enable"

dynamic_profile_access

别名: dynamic-profile-access

列表 / 元素=字符串

动态配置文件访问。

选项

  • "IMAP"

  • "SMTP"

  • "POP3"

  • "HTTP"

  • "FTP"

  • "IM"

  • "NNTP"

  • "IMAPS"

  • "SMTPS"

  • "POP3S"

  • "HTTPS"

  • "FTPS"

  • "SSH"

dynamic_profile_fallthrough

别名: dynamic-profile-fallthrough

字符串

动态配置文件贯通。

选项

  • "disable"

  • "enable"

dynamic_profile_group

别名: dynamic-profile-group

任意类型

(列表或字符串) 动态配置文件组。

dynamic_shaping

别名: dynamic-shaping

字符串

启用/禁用动态 RADIUS 定义的流量整形。

选项

  • "disable"

  • "enable"

eif_check

别名: eif-check

字符串

启用/禁用检查端点独立过滤针孔。

选项

  • "disable"

  • "enable"

eif_learn

别名: eif-learn

字符串

启用/禁用端点独立过滤针孔的学习。

选项

  • "disable"

  • "enable"

email_collect

别名: email-collect

字符串

电子邮件收集。

选项

  • "disable"

  • "enable"

email_collection_portal

别名: email-collection-portal

字符串

电子邮件收集门户。

选项

  • "disable"

  • "enable"

emailfilter_profile

别名: emailfilter-profile

字符串

电子邮件过滤配置文件。

endpoint_check

别名: endpoint-check

字符串

端点检查。

选项

  • "disable"

  • "enable"

endpoint_compliance

别名: endpoint-compliance

字符串

端点合规性。

选项

  • "disable"

  • "enable"

endpoint_keepalive_interface

别名: endpoint-keepalive-interface

任意类型

(列表或字符串) 端点保活接口。

endpoint_profile

别名: endpoint-profile

任意类型

(列表或字符串) 端点配置文件。

extended_log

别名: extended-log

字符串

扩展日志。

选项

  • "disable"

  • "enable"

failed_connection

别名: failed-connection

字符串

连接失败。

选项

  • "disable"

  • "enable"

fall_through_unauthenticated

别名: fall-through-unauthenticated

字符串

未认证贯通。

选项

  • "disable"

  • "enable"

fec

字符串

启用/禁用在 FEC 设备上与该策略匹配的流量上的前向纠错。

选项

  • "disable"

  • "enable"

file_filter_profile

别名: file-filter-profile

字符串

文件过滤配置文件。

firewall_session_dirty

别名: firewall-session-dirty

字符串

防火墙会话脏数据。

选项

  • "检查全部"

  • "检查新数据"

fixedport

字符串

固定端口。

选项

  • "disable"

  • "enable"

force_proxy

别名: force-proxy

字符串

强制代理。

选项

  • "disable"

  • "enable"

forticlient_compliance_devices

别名: forticlient-compliance-devices

列表 / 元素=字符串

FortiClient 合规设备。

选项

  • "Windows 电脑"

  • "Mac"

  • "iPhone/iPad"

  • 安卓

FortiClient合规性执行门户

别名: forticlient-compliance-enforcement-portal

字符串

FortiClient合规性执行门户。

选项

  • "disable"

  • "enable"

FSAE

字符串

FSAE。

选项

  • "disable"

  • "enable"

用于NTLM的FSAE服务器

别名: fsae-server-for-ntlm

任意类型

(列表或字符串) 用于NTLM的FSAE服务器。

FSSO

字符串

FSSO。

选项

  • "disable"

  • "enable"

用于NTLM的FSSO代理

别名: fsso-agent-for-ntlm

字符串

用于NTLM的FSSO代理。

FSSO组

别名: fsso-groups

任意类型

(列表或字符串) FSSO组。

地理位置

别名: geo-location

字符串

地理位置。

选项

  • "disable"

  • "enable"

GeoIP任播

别名: geoip-anycast

字符串

GeoIP任播。

选项

  • "disable"

  • "enable"

GeoIP匹配

别名: geoip-match

字符串

GeoIP匹配。

选项

  • 物理位置

  • 注册位置

全局标签

别名: global-label

字符串

全局标签。

组

任意类型

(列表或字符串) 组。

GTP配置文件

别名: gtp-profile

字符串

GTP配置文件。

HTTP策略重定向

别名: http-policy-redirect

字符串

HTTP策略重定向。

选项

  • "disable"

  • "enable"

HTTP隧道认证

别名: http-tunnel-auth

字符串

HTTP隧道认证。

选项

  • "disable"

  • "enable"

IA配置文件

别名: ia-profile

任意类型

(列表) IA配置文件。

ICAP配置文件

别名: icap-profile

字符串

ICAP配置文件。

基于身份的

别名: identity-based

字符串

基于身份的。

选项

  • "disable"

  • "enable"

基于身份的策略

别名: identity-based-policy

列表 / 元素=字典

基于身份的策略。

动作

字符串

操作。

选项

  • "deny"

  • "accept"

应用图表

别名:application-charts

列表 / 元素=字符串

应用图表。

选项

  • "top10-app"

  • "top10-p2p-user"

  • "top10-media-user"

应用列表

别名:application-list

字符串

应用列表。

杀毒软件配置文件

别名:av-profile

字符串

AV 配置文件。

捕获数据包

别名:capture-packet

字符串

捕获数据包。

选项

  • "disable"

  • "enable"

深度检测选项

别名: deep-inspection-options

字符串

深度检测选项。

设备

字符串

设备。

DLP传感器

别名: dlp-sensor

字符串

DLP传感器。

目标地址

字符串

目标地址。

目标地址取反

别名: dstaddr-negate

字符串

目的地址取反。

选项

  • "disable"

  • "enable"

端点合规性

别名: endpoint-compliance

字符串

端点合规性。

选项

  • "disable"

  • "enable"

组

字符串

组。

ICAP配置文件

别名: icap-profile

字符串

ICAP配置文件。

ID

整数

ID。

IPS传感器

别名: ips-sensor

字符串

IPS传感器。

日志流量

字符串

日志流量。

选项

  • "disable"

  • "enable"

  • 全部

  • UTM

应用日志流量

别名: logtraffic-app

字符串

应用日志流量。

选项

  • "disable"

  • "enable"

日志流量起始

别名: logtraffic-start

字符串

日志流量起始。

选项

  • "disable"

  • "enable"

MMS配置文件

别名: mms-profile

字符串

MMS配置文件。

每个IP的整形器

别名: per-ip-shaper

字符串

每个IP的整形器。

配置文件组

别名: profile-group

字符串

配置文件组。

协议配置文件选项

别名: profile-protocol-options

字符串

协议配置文件选项。

配置文件类型

别名: profile-type

字符串

配置文件类型。

选项

  • 单个

  • 组

替换消息组

别名: replacemsg-group

字符串

替换消息组。

调度

字符串

调度。

发送拒绝数据包

别名: send-deny-packet

字符串

发送拒绝数据包。

选项

  • "disable"

  • "enable"

服务

字符串

服务。

服务取反

别名: service-negate

字符串

服务取反。

选项

  • "disable"

  • "enable"

垃圾邮件过滤配置文件

别名: spamfilter-profile

字符串

垃圾邮件过滤配置文件。

SSL VPN门户

别名: sslvpn-portal

字符串

SSL VPN门户。

SSL VPN领域

别名: sslvpn-realm

字符串

SSL VPN领域。

流量整形器

别名: traffic-shaper

字符串

流量整形器。

反向流量整形器

别名: traffic-shaper-reverse

字符串

反向流量整形器。

用户

字符串

用户。

UTM状态

别名: utm-status

字符串

UTM状态。

选项

  • "disable"

  • "enable"

VoIP配置文件

别名: voip-profile

字符串

VoIP配置文件。

网页过滤配置文件

别名: webfilter-profile

字符串

网页过滤配置文件。

基于身份的路由

别名: identity-based-route

字符串

基于身份的路由。

身份来源

别名: identity-from

字符串

身份来源。

选项

  • 认证

  • 设备

隐式代理检测

别名: implicit-proxy-detection

字符串

隐式代理检测。

选项

  • "disable"

  • "enable"

入站

字符串

入站。

选项

  • "disable"

  • "enable"

检测模式

别名: inspection-mode

字符串

检测模式。

选项

  • 代理

  • 流

互联网服务

别名: internet-service

字符串

互联网服务。

选项

  • "disable"

  • "enable"

IPv6互联网服务

别名: internet-service6

字符串

启用/禁用为此策略使用IPv6互联网服务。

选项

  • "disable"

  • "enable"

自定义IPv6互联网服务名称

别名: internet-service6-custom

任意类型

(列表) 自定义IPv6互联网服务名称。

自定义IPv6互联网服务组名称

别名: internet-service6-custom-group

任意类型

(列表) 自定义IPv6互联网服务组名称。

IPv6互联网服务组名称

别名: internet-service6-group

任意类型

(列表) IPv6互联网服务组名称。

IPv6互联网服务名称

别名: internet-service6-name

任意类型

(列表) IPv6互联网服务名称。

IPv6互联网服务取反

别名: internet-service6-negate

字符串

启用时,internet-service6指定服务不应是什么。

选项

  • "disable"

  • "enable"

源IPv6互联网服务

别名: internet-service6-src

字符串

启用/禁用为此策略在源中使用IPv6互联网服务。

选项

  • "disable"

  • "enable"

自定义源IPv6互联网服务名称

别名: internet-service6-src-custom

任意类型

(列表) 自定义源IPv6互联网服务名称。

自定义源IPv6互联网服务组名称

别名: internet-service6-src-custom-group

任意类型

(列表) 自定义源IPv6互联网服务组名称。

源IPv6互联网服务组名称

别名: internet-service6-src-group

任意类型

(列表) 源IPv6互联网服务组名称。

源IPv6互联网服务名称

别名: internet-service6-src-name

任意类型

(列表) 源IPv6互联网服务名称。

源IPv6互联网服务取反

别名: internet-service6-src-negate

字符串

启用时,internet-service6-src指定服务不应是什么。

选项

  • "disable"

  • "enable"

自定义互联网服务

别名: internet-service-custom

任意类型

(列表或字符串) 自定义互联网服务。

自定义互联网服务组

别名:internet-service-custom-group

任意类型

(列表或字符串) Internet 服务自定义组。

internet_service_group

别名:internet-service-group

任意类型

(列表或字符串) Internet 服务组。

internet_service_id

别名:internet-service-id

任意类型

(列表或字符串) Internet 服务 ID。

internet_service_name

别名:internet-service-name

任意类型

(列表或字符串) Internet 服务名称。

internet_service_negate

别名:internet-service-negate

字符串

Internet 服务否定。

选项

  • "disable"

  • "enable"

internet_service_src

别名:internet-service-src

字符串

Internet 服务源。

选项

  • "disable"

  • "enable"

internet_service_src_custom

别名:internet-service-src-custom

任意类型

(列表或字符串) Internet 服务自定义源。

internet_service_src_custom_group

别名:internet-service-src-custom-group

任意类型

(列表或字符串) Internet 服务自定义源组。

internet_service_src_group

别名:internet-service-src-group

任意类型

(列表或字符串) Internet 服务源组。

internet_service_src_id

别名:internet-service-src-id

任意类型

(列表或字符串) Internet 服务源ID。

internet_service_src_name

别名:internet-service-src-name

任意类型

(列表或字符串) Internet 服务源名称。

internet_service_src_negate

别名:internet-service-src-negate

字符串

Internet 服务源否定。

选项

  • "disable"

  • "enable"

ip_based

别名:ip-based

字符串

基于 IP。

选项

  • "disable"

  • "enable"

ip_version_type

别名:ip-version-type

字符串

策略的 IP 版本。

ippool

字符串

IP 池。

选项

  • "disable"

  • "enable"

ips_sensor

别名: ips-sensor

字符串

IPS传感器。

ips_voip_filter

别名:ips-voip-filter

字符串

现有 VoIP 的名称

isolator_profile

别名:isolator-profile

任意类型

(列表) 隔离器配置文件。

isolator_server

别名:isolator-server

任意类型

(列表) 隔离器服务器。

label

字符串

标签。

learning_mode

别名:learning-mode

字符串

学习模式。

选项

  • "disable"

  • "enable"

log_http_transaction

别名:log-http-transaction

字符串

记录 HTTP 事务。

选项

  • "disable"

  • "enable"

  • 全部

  • UTM

log_unmatched_traffic

别名:log-unmatched-traffic

字符串

记录不匹配的流量。

选项

  • "disable"

  • "enable"

logtraffic

字符串

日志流量。

选项

  • "disable"

  • "enable"

  • 全部

  • UTM

logtraffic_app

别名: logtraffic-app

字符串

应用日志流量。

选项

  • "disable"

  • "enable"

logtraffic_start

别名: logtraffic-start

字符串

日志流量起始。

选项

  • "disable"

  • "enable"

match_vip

别名:match-vip

字符串

匹配 VIP。

选项

  • "disable"

  • "enable"

match_vip_only

别名:match-vip-only

字符串

仅匹配 VIP。

选项

  • "disable"

  • "enable"

max_session_per_user

别名:max-session-per-user

整数

每个用户的最大会话数。

mms_profile

别名: mms-profile

任意类型

(列表或字符串) MMS 配置文件。

name

字符串

名称。

nat

字符串

NAT。

选项

  • "disable"

  • "enable"

nat46

字符串

启用/禁用 NAT46。

选项

  • "disable"

  • "enable"

nat64

字符串

启用/禁用 NAT64。

选项

  • "disable"

  • "enable"

natinbound

字符串

入站 NAT。

选项

  • "disable"

  • "enable"

natip

字符串

NAT IP。

natoutbound

字符串

出站 NAT。

选项

  • "disable"

  • "enable"

network_service_dynamic

别名:network-service-dynamic

任意类型

(列表) 动态网络服务名称。

network_service_src_dynamic

别名:network-service-src-dynamic

任意类型

(列表) 动态网络服务源名称。

np_accelation

别名:np-accelation

字符串

NP 加速。

选项

  • "disable"

  • "enable"

np_acceleration

别名:np-acceleration

字符串

NP 加速。

选项

  • "disable"

  • "enable"

ntlm

字符串

NTLM。

选项

  • "disable"

  • "enable"

ntlm_enabled_browsers

别名:ntlm-enabled-browsers

任意类型

(列表) 启用 NTLM 的浏览器。

ntlm_guest

别名:ntlm-guest

字符串

NTLM 来宾。

选项

  • "disable"

  • "enable"

outbound

字符串

出站。

选项

  • "disable"

  • "enable"

pass_through

别名:pass-through

字符串

直通。

选项

  • "disable"

  • "enable"

passive_wan_health_measurement

别名:passive-wan-health-measurement

字符串

启用/禁用被动 WAN 健康检测。

选项

  • "disable"

  • "enable"

pcp_inbound

别名:pcp-inbound

字符串

启用/禁用 PCP 入站 DNAT。

选项

  • "disable"

  • "enable"

pcp_outbound

别名:pcp-outbound

字符串

启用/禁用 PCP 出站 SNAT。

选项

  • "disable"

  • "enable"

pcp_poolname

别名:pcp-poolname

任意类型

(列表) PCP 池名称。

per_ip_shaper

别名: per-ip-shaper

字符串

每个IP的整形器。

permit_any_host

别名:permit-any-host

字符串

允许任何主机。

选项

  • "disable"

  • "enable"

permit_stun_host

别名:permit-stun-host

字符串

允许 STUN 主机。

选项

  • "disable"

  • "enable"

pfcp_profile

别名:pfcp-profile

字符串

PFCP 配置文件。

policy_behaviour_type

别名:policy-behaviour-type

字符串

策略的行为。

policy_expiry

别名:policy-expiry

字符串

启用/禁用策略过期。

选项

  • "disable"

  • "enable"

policy_expiry_date

别名:policy-expiry-date

字符串

策略过期日期

policy_expiry_date_utc

别名:policy-expiry-date-utc

字符串

策略过期日期和时间,以纪元时间格式表示。

policy_offload

别名:policy-offload

字符串

启用/禁用 CGNAT 的硬件会话设置。

选项

  • "disable"

  • "enable"

policyid

整数 / 必需

策略 ID。

poolname

任意类型

(列表或字符串) 池名称。

poolname6

任意类型

(列表或字符串) 池名称6。

port_preserve

别名:port-preserve

字符串

如果原始源端口未被使用,则启用/禁用源 NAT 的原始源端口保留。

选项

  • "disable"

  • "enable"

profile_group

别名: profile-group

字符串

配置文件组。

profile_protocol_options

别名: profile-protocol-options

字符串

协议配置文件选项。

profile_type

别名: profile-type

字符串

配置文件类型。

选项

  • 单个

  • 组

radius_ip_auth_bypass

别名:radius-ip-auth-bypass

字符串

启用 IP 身份验证绕过。

选项

  • "disable"

  • "enable"

radius_mac_auth_bypass

别名:radius-mac-auth-bypass

字符串

Radius MAC 身份验证绕过。

选项

  • "disable"

  • "enable"

redirect_profile

别名:redirect-profile

任意类型

(列表) 重定向配置文件。

redirect_url

别名:redirect-url

字符串

重定向 URL。

replacemsg_group

别名: replacemsg-group

任意类型

(列表或字符串) 替换消息组。

replacemsg_override_group

别名:replacemsg-override-group

字符串

替换消息覆盖组。

reputation_direction

别名:reputation-direction

字符串

信誉方向。

选项

  • "源"

  • "目标"

reputation_direction6

别名:reputation-direction6

字符串

IPv6 信誉生效的初始流量方向。

选项

  • "源"

  • "目标"

reputation_minimum

别名:reputation-minimum

整数

信誉最低值。

reputation_minimum6

别名:reputation-minimum6

整数

触发操作所需的IPv6最小信誉。

require_tfa

别名:require-tfa

字符串

需要双因素身份验证。

选项

  • "disable"

  • "enable"

reverse_cache

别名:reverse-cache

字符串

反向缓存。

选项

  • "disable"

  • "enable"

rsso

字符串

Rsso。

选项

  • "disable"

  • "enable"

rtp_addr

别名:rtp-addr

任意类型

(列表或字符串) RTP地址。

rtp_nat

别名:rtp-nat

字符串

RTP NAT。

选项

  • "disable"

  • "enable"

scan_botnet_connections

别名:scan-botnet-connections

字符串

扫描僵尸网络连接。

选项

  • "disable"

  • "block"

  • "monitor"

schedule

字符串

调度。

schedule_timeout

别名:schedule-timeout

字符串

调度超时。

选项

  • "disable"

  • "enable"

sctp_filter_profile

别名:sctp-filter-profile

字符串

现有SCTP过滤器的名称。

send_deny_packet

别名: send-deny-packet

字符串

发送拒绝数据包。

选项

  • "disable"

  • "enable"

service

任意类型

(列表或字符串) 服务。

service_negate

别名: service-negate

字符串

服务取反。

选项

  • "disable"

  • "enable"

session_ttl

别名:session-ttl

任意类型

(整数或字符串) 会话TTL。

sessions

字符串

会话。

选项

  • "disable"

  • "enable"

sgt

任意类型

(列表) 安全组标签。

sgt_check

别名:sgt-check

字符串

启用/禁用安全组标签。

选项

  • "disable"

  • "enable"

spamfilter_profile

别名: spamfilter-profile

任意类型

(列表或字符串) 垃圾邮件过滤配置文件。

src_vendor_mac

别名:src-vendor-mac

任意类型

(列表或字符串) 源厂商MAC地址。

srcaddr

任意类型

(列表或字符串) 源地址。

srcaddr6

任意类型

(列表或字符串) IPv6源地址。

srcaddr6_negate

别名:srcaddr6-negate

字符串

启用后,srcaddr6 指定源地址不能是什么。

选项

  • "disable"

  • "enable"

srcaddr_negate

别名:srcaddr-negate

字符串

源地址否定。

选项

  • "disable"

  • "enable"

srcintf

任意类型

(列表或字符串) 源接口。

ssh_filter_profile

别名:ssh-filter-profile

字符串

SSH过滤配置文件。

ssh_policy_check

别名:ssh-policy-check

字符串

SSH策略检查。

选项

  • "disable"

  • "enable"

ssh_policy_redirect

别名:ssh-policy-redirect

字符串

SSH策略重定向。

选项

  • "disable"

  • "enable"

ssl_mirror

别名:ssl-mirror

字符串

SSL镜像。

选项

  • "disable"

  • "enable"

ssl_mirror_intf

别名:ssl-mirror-intf

任意类型

(列表或字符串) SSL镜像接口。

ssl_ssh_profile

别名:ssl-ssh-profile

字符串

SSL/SSH配置文件。

sslvpn_auth

别名:sslvpn-auth

字符串

SSL VPN认证。

选项

  • "any"

  • "local"

  • "radius"

  • "ldap"

  • "tacacs+"

sslvpn_ccert

别名:sslvpn-ccert

字符串

SSL VPN客户端证书。

选项

  • "disable"

  • "enable"

sslvpn_cipher

别名:sslvpn-cipher

字符串

SSL VPN加密。

选项

  • "any"

  • "high"

  • "medium"

sso_auth_method

别名:sso-auth-method

字符串

SSO认证方法。

选项

  • "fsso"

  • "rsso"

status

字符串

状态。

选项

  • "disable"

  • "enable"

tags

任意类型

(列表或字符串) 标签。

tcp_mss_receiver

别名:tcp-mss-receiver

整数

TCP MSS接收器。

tcp_mss_sender

别名:tcp-mss-sender

整数

TCP MSS发送器。

tcp_reset

别名:tcp-reset

字符串

TCP重置。

选项

  • "disable"

  • "enable"

tcp_session_without_syn

别名:tcp-session-without-syn

字符串

无SYN的TCP会话。

选项

  • 全部

  • "data-only"

  • "disable"

tcp_timeout_pid

别名:tcp-timeout-pid

任意类型

(列表) TCP超时配置文件ID。

timeout_send_rst

别名:timeout-send-rst

字符串

超时发送RST。

选项

  • "disable"

  • "enable"

tos

字符串

TOS。

tos_mask

别名:tos-mask

字符串

TOS掩码。

tos_negate

别名:tos-negate

字符串

TOS否定。

选项

  • "disable"

  • "enable"

traffic_shaper

别名: traffic-shaper

字符串

流量整形器。

traffic_shaper_reverse

别名: traffic-shaper-reverse

字符串

反向流量整形器。

transaction_based

别名:transaction-based

字符串

基于事务。

选项

  • "disable"

  • "enable"

transparent

字符串

透明模式。

选项

  • "disable"

  • "enable"

type

字符串

类型。

选项

  • "explicit-web"

  • "transparent"

  • "explicit-ftp"

  • "ssh-tunnel"

  • "SSH"

  • "wanopt"

  • "access-proxy"

udp_timeout_pid

别名:udp-timeout-pid

任意类型

(列表) UDP超时配置文件ID。

url_category

别名:url-category

任意类型

(列表或字符串) URL类别。

url_risk

别名:url-risk

任意类型

(列表) URL风险。

users

任意类型

(列表或字符串) 用户。

utm_inspection_mode

别名:utm-inspection-mode

字符串

UTM检测模式。

选项

  • 代理

  • 流

utm_status

别名: utm-status

字符串

UTM状态。

选项

  • "disable"

  • "enable"

uuid

字符串

UUID。

uuid_idx

别名:uuid-idx

整数

UUID索引。

vendor_mac

别名:vendor-mac

任意类型

(列表或字符串) 厂商MAC地址。

videofilter_profile

别名:videofilter-profile

字符串

现有视频过滤配置文件的名称。

virtual_patch_profile

别名:virtual-patch-profile

字符串

现有虚拟补丁配置文件的名称。

vlan_cos_fwd

别名:vlan-cos-fwd

整数

VLAN COS转发。

vlan_cos_rev

别名:vlan-cos-rev

整数

VLAN COS反向。

vlan_filter

别名:vlan-filter

字符串

VLAN过滤。

voip_profile

别名: voip-profile

字符串

VoIP配置文件。

vpntunnel

字符串

VPN隧道。

waf_profile

别名:waf-profile

字符串

WAF配置文件。

wanopt

字符串

WAN优化。

选项

  • "disable"

  • "enable"

wanopt_detection

别名:wanopt-detection

字符串

WAN优化检测。

选项

  • "active"

  • "passive"

  • "off"

wanopt_passive_opt

别名:wanopt-passive-opt

字符串

WAN优化被动选项。

选项

  • "default"

  • "transparent"

  • "non-transparent"

wanopt_peer

别名:wanopt-peer

字符串

WAN优化对等体。

wanopt_profile

别名:wanopt-profile

字符串

WAN优化配置文件。

wccp

字符串

WCCP。

选项

  • "disable"

  • "enable"

web_auth_cookie

别名:web-auth-cookie

字符串

Web认证Cookie。

选项

  • "disable"

  • "enable"

webcache

字符串

Web缓存。

选项

  • "disable"

  • "enable"

webcache_https

别名:webcache-https

字符串

Web缓存HTTPS。

选项

  • "disable"

  • "ssl-server"

  • "any"

  • "enable"

webfilter_profile

别名: webfilter-profile

字符串

网页过滤配置文件。

webproxy_forward_server

别名:webproxy-forward-server

字符串

Web代理转发服务器。

webproxy_profile

别名:webproxy-profile

字符串

Web代理配置文件。

wsso

字符串

WSSO。

选项

  • "disable"

  • "enable"

ztna_device_ownership

别名:ztna-device-ownership

字符串

启用/禁用零信任设备所有权。

选项

  • "disable"

  • "enable"

ztna_ems_tag

别名:ztna-ems-tag

任意类型

(列表或字符串) 源ZTNA-EMS标签名称。

ztna_ems_tag_secondary

别名:ztna-ems-tag-secondary

任意类型

(列表) 源ZTNA-EMS次要标签名称。

ztna_geo_tag

别名:ztna-geo-tag

任意类型

(列表或字符串) 源ZTNA地理标签名称。

ztna_policy_redirect

别名:ztna-policy-redirect

字符串

将ZTNA流量重定向到匹配的访问代理代理策略。

选项

  • "disable"

  • "enable"

ztna_status

别名:ztna-status

字符串

启用/禁用零信任访问。

选项

  • "disable"

  • "enable"

ztna_tags_match_logic

别名:ztna-tags-match-logic

字符串

Ztna标签匹配逻辑。

选项

  • "或"

  • "与"

proposed_method

字符串

底层Json RPC请求的覆盖方法。

选项

  • "更新"

  • "设置"

  • "添加"

rc_failed

列表 / 元素=整数

将被覆盖的失败条件对应的RC代码列表。

rc_succeeded

列表 / 元素=整数

将被覆盖的成功条件对应的RC代码列表。

state

字符串 / 必填

创建、更新或删除对象的指令。

选项

  • "存在"

  • "不存在"

workspace_locking_adom

字符串

FortiManager在工作区模式下运行时需要锁定的ADOM,值可以是global和其他包括root。

workspace_locking_timeout

整数

等待其他用户释放工作区锁的最大时间(秒)。

默认值: 300

备注

注意

  • 从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
  hosts: fortimanagers
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Configure IPv4 footer policies.
      fortinet.fortimanager.fmgr_pkg_footer_policy:
        bypass_validation: false
        pkg: ansible
        state: present
        pkg_footer_policy:
          action: accept # <value in [deny, accept, ipsec, ...]>
          dstaddr: gall
          dstintf: any
          name: ansible-test-footer
          policyid: 1074741836 # must larger than 2^30(1074741824), since header/footer policy is a special policy
          schedule: galways
          service: gALL
          srcaddr: gall
          srcintf: any
          status: enable

- name: Gathering fortimanager facts
  hosts: fortimanagers
  gather_facts: false
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Retrieve all the IPv4 footer policies
      fortinet.fortimanager.fmgr_fact:
        facts:
          selector: "pkg_footer_policy"
          params:
            pkg: "ansible"
            policy: "your_value"

返回值

常见的返回值已在此处记录,以下是此模块独有的字段

键

描述

meta

字典

请求的结果。

返回:始终

request_url

字符串

请求的完整URL。

返回:始终

示例: "/sys/login/user"

response_code

整数

API请求的状态。

返回:始终

示例: 0

response_data

列表 / 元素=字符串

API响应。

返回:始终

response_message

字符串

API响应的描述性消息。

返回:始终

示例: "OK."

system_information

字典

目标系统的信息。

返回:始终

rc

整数

请求的状态。

返回:始终

示例: 0

version_check_warning

列表 / 元素=字符串

如果剧本中使用的参数不受当前FortiManager版本支持,则会发出警告。

返回:复杂类型

作者

  • 杜欣伟 (@dux-fortinet)

  • 李星 (@lix-fortinet)

  • 薛杰 (@JieX19)

  • 郑链 (@chillancezen)

  • 沈方 (@fshen01)

  • 卢洪斌 (@fgtdev-hblu)

收藏链接

  • 问题追踪
  • 主页
  • 代码库
上一篇 下一篇

© 版权所有 Ansible 项目贡献者。 上次更新于 2024年12月19日。