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

Ansible 入门

  • Ansible 入门
  • 执行环境入门

安装、升级和配置

  • 安装指南
  • Ansible 移植指南

使用 Ansible

  • 构建 Ansible 清单
  • 使用 Ansible 命令行工具
  • 使用 Ansible 剧本
  • 使用 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 命名空间中的集合
  • 所有模块和插件的索引
  • 剧本关键字
  • 返回值
  • Ansible 配置设置
  • 控制 Ansible 的行为方式:优先级规则
  • YAML 语法
  • Python 3 支持
  • 解释器发现
  • 发布和维护
  • 测试策略
  • 健全性测试
  • 常见问题解答
  • 词汇表
  • Ansible 参考:模块实用程序
  • 特殊变量
  • Red Hat Ansible 自动化平台
  • Ansible 自动化中心
  • 记录 Ansible 输出

路线图

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




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


fortinet.fortimanager.fmgr_pkg_footer_policy6 模块 – 配置 IPv6 策略。

注意

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

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

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

要在剧本中使用它,请指定:fortinet.fortimanager.fmgr_pkg_footer_policy6。

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_policy6

字典

设置的顶级参数。

_policy_block

整数

分配的策略块。

action

字符串

操作。

选项

  • "deny"

  • "accept"

  • "ipsec"

  • "ssl-vpn"

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

任何

(列表或字符串)应用程序列表。

auto_asic_offload

别名:auto-asic-offload

字符串

自动 ASIC 卸载。

选项

  • "disable"

  • "enable"

av_profile

别名:av-profile

任何

(列表或字符串)防病毒配置文件。

casi_profile

别名:casi-profile

任何

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

cgn_log_server_grp

别名:cgn-log-server-grp

字符串

NP 日志服务器组名称

cifs_profile

别名:cifs-profile

任何

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

comments

字符串

注释。

custom_log_fields

别名:custom-log-fields

任何

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

decrypted_traffic_mirror

别名:decrypted-traffic-mirror

任何

(列表或字符串)解密流量镜像。

deep_inspection_options

别名:deep-inspection-options

任何

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

device_detection_portal

别名:device-detection-portal

字符串

设备检测门户。

选项

  • "disable"

  • "enable"

devices

任何

(列表或字符串)设备。

diffserv_forward

别名:diffserv-forward

字符串

Diffserv 前向。

选项

  • "disable"

  • "enable"

diffserv_reverse

别名:diffserv-reverse

字符串

Diffserv 反向。

选项

  • "disable"

  • "enable"

diffservcode_forward

别名:diffservcode-forward

字符串

Diffservcode 前向。

diffservcode_rev

别名:diffservcode-rev

字符串

Diffservcode 反向。

dlp_sensor

别名:dlp-sensor

任何

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

dnsfilter_profile

别名:dnsfilter-profile

任何

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

dscp_match

别名:dscp-match

字符串

Dscp 匹配。

选项

  • "disable"

  • "enable"

dscp_negate

别名:dscp-negate

字符串

Dscp 否定。

选项

  • "disable"

  • "enable"

dscp_value

别名:dscp-value

字符串

Dscp 值。

dsri

字符串

Dsri。

选项

  • "disable"

  • "enable"

dstaddr

任何

(列表或字符串)Dstaddr。

dstaddr_negate

别名:dstaddr-negate

字符串

Dstaddr 否定。

选项

  • "disable"

  • "enable"

dstintf

任何

(列表或字符串)Dstintf。

dynamic_profile

别名:dynamic-profile

字符串

动态配置文件。

选项

  • "disable"

  • "enable"

dynamic_profile_access

别名:dynamic-profile-access

列表 / 元素=字符串

动态配置文件访问。

选项

  • "imap"

  • "smtp"

  • "pop3"

  • "http"

  • "ftp"

  • "im"

  • "nntp"

  • "imaps"

  • "smtps"

  • "pop3s"

  • "https"

  • "ftps"

dynamic_profile_group

别名: dynamic-profile-group

任何

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

email_collection_portal

别名: email-collection-portal

字符串

电子邮件收集门户。

选项

  • "disable"

  • "enable"

emailfilter_profile

别名: emailfilter-profile

任何

(列表或字符串) 电子邮件过滤器配置文件。

file_filter_profile

别名: file-filter-profile

任何

(列表或字符串) 文件过滤器配置文件。

firewall_session_dirty

别名: firewall-session-dirty

字符串

防火墙会话脏标记。

选项

  • "check-all"

  • "check-new"

fixedport

字符串

固定端口。

选项

  • "disable"

  • "enable"

fsae

字符串

Fsae。

选项

  • "disable"

  • "enable"

fsso_groups

别名: fsso-groups

任何

(列表或字符串) Fsso 组。

global_label

别名: global-label

字符串

全局标签。

groups

任何

(列表或字符串) 组。

http_policy_redirect

别名: http-policy-redirect

字符串

HTTP策略重定向。

选项

  • "disable"

  • "enable"

icap_profile

别名: icap-profile

任何

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

identity_based

别名: identity-based

字符串

基于身份。

选项

  • "disable"

  • "enable"

identity_based_policy6

别名: identity-based-policy6

列表 / 元素=字典

基于身份的策略6。

action

字符串

操作。

选项

  • "deny"

  • "accept"

application_list

别名:application-list

字符串

应用程序列表。

av_profile

别名:av-profile

字符串

AV 配置文件。

deep_inspection_options

别名:deep-inspection-options

字符串

深度检测选项。

devices

字符串

设备。

dlp_sensor

别名:dlp-sensor

字符串

DLP传感器。

endpoint_compliance

别名: endpoint-compliance

字符串

端点合规性。

选项

  • "disable"

  • "enable"

groups

字符串

组。

icap_profile

别名: icap-profile

字符串

Icap 配置文件。

id

整数

ID。

ips_sensor

别名: ips-sensor

字符串

IPS传感器。

logtraffic

字符串

记录流量。

选项

  • "disable"

  • "enable"

  • "all"

  • "utm"

mms_profile

别名: mms-profile

字符串

MMS配置文件。

per_ip_shaper

别名: per-ip-shaper

字符串

每个IP整形器。

profile_group

别名: profile-group

字符串

配置文件组。

profile_protocol_options

别名: profile-protocol-options

字符串

配置文件协议选项。

profile_type

别名: profile-type

字符串

配置文件类型。

选项

  • "single"

  • "group"

replacemsg_group

别名: replacemsg-group

字符串

替换消息组。

schedule

字符串

计划。

send_deny_packet

别名: send-deny-packet

字符串

发送拒绝数据包。

选项

  • "disable"

  • "enable"

service

字符串

服务。

service_negate

别名: service-negate

字符串

服务取反。

选项

  • "disable"

  • "enable"

spamfilter_profile

别名: spamfilter-profile

字符串

垃圾邮件过滤器配置文件。

sslvpn_portal

别名: sslvpn-portal

字符串

SSLVPN门户。

sslvpn_realm

别名: sslvpn-realm

字符串

SSLVPN 域。

traffic_shaper

别名: traffic-shaper

字符串

流量整形器。

traffic_shaper_reverse

别名: traffic-shaper-reverse

字符串

反向流量整形器。

utm_status

别名: utm-status

字符串

UTM状态。

选项

  • "disable"

  • "enable"

voip_profile

别名: voip-profile

字符串

VoIP 配置文件。

webfilter_profile

别名: webfilter-profile

字符串

Web过滤器配置文件。

identity_from

别名: identity-from

字符串

身份来源。

选项

  • "auth"

  • "device"

inbound

字符串

入站。

选项

  • "disable"

  • "enable"

inspection_mode

别名: inspection-mode

字符串

检查模式。

选项

  • "proxy"

  • "flow"

ippool

字符串

IP池。

选项

  • "disable"

  • "enable"

ips_sensor

别名: ips-sensor

任何

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

label

字符串

标签。

logtraffic

字符串

记录流量。

选项

  • "disable"

  • "enable"

  • "all"

  • "utm"

logtraffic_start

别名: logtraffic-start

字符串

开始记录流量。

选项

  • "disable"

  • "enable"

mms_profile

别名: mms-profile

任何

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

name

字符串

名称。

nat

字符串

NAT。

选项

  • "disable"

  • "enable"

natinbound

字符串

入站NAT。

选项

  • "disable"

  • "enable"

natoutbound

字符串

出站NAT。

选项

  • "disable"

  • "enable"

np_accelation

别名: np-accelation

字符串

NP 加速。

选项

  • "disable"

  • "enable"

np_acceleration

别名: np-acceleration

字符串

NP 加速。

选项

  • "disable"

  • "enable"

outbound

字符串

出站。

选项

  • "disable"

  • "enable"

per_ip_shaper

别名: per-ip-shaper

任何

(列表或字符串) 每个IP整形器。

policy_offload

别名: policy-offload

字符串

启用/禁用将策略配置卸载到 CP 处理器。

选项

  • "disable"

  • "enable"

policyid

整数 / 必需

策略 ID。

poolname

任何

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

profile_group

别名: profile-group

任何

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

profile_protocol_options

别名: profile-protocol-options

任何

(列表或字符串) 配置文件协议选项。

profile_type

别名: profile-type

字符串

配置文件类型。

选项

  • "single"

  • "group"

replacemsg_group

别名: replacemsg-group

任何

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

replacemsg_override_group

别名: replacemsg-override-group

任何

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

rsso

字符串

Rsso。

选项

  • "disable"

  • "enable"

schedule

任何

(列表或字符串) 计划。

send_deny_packet

别名: send-deny-packet

字符串

发送拒绝数据包。

选项

  • "disable"

  • "enable"

service

任何

(列表或字符串) 服务。

service_negate

别名: service-negate

字符串

服务取反。

选项

  • "disable"

  • "enable"

session_ttl

别名: session-ttl

任何

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

spamfilter_profile

别名: spamfilter-profile

任何

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

srcaddr

任何

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

srcaddr_negate

别名: srcaddr-negate

字符串

源地址取反。

选项

  • "disable"

  • "enable"

srcintf

任何

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

ssh_filter_profile

别名: ssh-filter-profile

任何

(list 或 str) SSH 过滤器配置文件。

ssh_policy_redirect

别名: ssh-policy-redirect

字符串

SSH策略重定向。

选项

  • "disable"

  • "enable"

ssl_mirror

别名: ssl-mirror

字符串

SSL 镜像。

选项

  • "disable"

  • "enable"

ssl_mirror_intf

别名: ssl-mirror-intf

任何

(list 或 str) SSL 镜像接口。

ssl_ssh_profile

别名: ssl-ssh-profile

任何

(list 或 str) 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"

status

字符串

状态。

选项

  • "disable"

  • "enable"

tags

任何

(list 或 str) 标签。

tcp_mss_receiver

别名: tcp-mss-receiver

整数

TCP MSS 接收器。

tcp_mss_sender

别名: tcp-mss-sender

整数

TCP MSS 发送器。

tcp_session_without_syn

别名: tcp-session-without-syn

字符串

无 SYN 的 TCP 会话。

选项

  • "all"

  • "data-only"

  • "disable"

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

任何

(list 或 str) 流量整形器。

traffic_shaper_reverse

别名: traffic-shaper-reverse

任何

(list 或 str) 反向流量整形器。

url_category

别名: url-category

任何

(list 或 str) URL 类别。

users

任何

(list 或 str) 用户。

utm_inspection_mode

别名: utm-inspection-mode

字符串

UTM 检测模式。

选项

  • "proxy"

  • "flow"

utm_status

别名: utm-status

字符串

UTM状态。

选项

  • "disable"

  • "enable"

uuid

字符串

UUID。

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

任何

(list 或 str) VoIP 配置文件。

vpntunnel

任何

(list 或 str) VPN隧道。

waf_profile

别名: waf-profile

任何

(list 或 str) WAF 配置文件。

webcache

字符串

Web 缓存。

选项

  • "disable"

  • "enable"

webcache_https

别名: webcache-https

字符串

Web 缓存 HTTPS。

选项

  • "disable"

  • "enable"

webfilter_profile

别名: webfilter-profile

任何

(list 或 str) Web 过滤器配置文件。

webproxy_forward_server

别名: webproxy-forward-server

任何

(list 或 str) Web 代理转发服务器。

webproxy_profile

别名: webproxy-profile

任何

(list 或 str) Web 代理配置文件。

proposed_method

字符串

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

选项

  • "update"

  • "set"

  • "add"

rc_failed

list / elements=integer

将被覆盖以失败的 rc 代码列表。

rc_succeeded

list / elements=integer

将被覆盖以成功的 rc 代码列表。

state

字符串 / 必需

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

选项

  • "present"

  • "absent"

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 IPv6 footer policies.
      fortinet.fortimanager.fmgr_pkg_footer_policy6:
        bypass_validation: false
        pkg: ansible
        state: present
        pkg_footer_policy6:
          action: accept # <value in [deny, accept, ipsec, ...]>
          comments: ansible-comment
          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: disable

- 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 IPv6 footer policies
      fortinet.fortimanager.fmgr_fact:
        facts:
          selector: "pkg_footer_policy6"
          params:
            pkg: "ansible"
            policy6: "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

列表 / 元素=字符串

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

返回: 复杂

作者

  • Xinwei Du (@dux-fortinet)

  • Xing Li (@lix-fortinet)

  • Jie Xue (@JieX19)

  • Link Zheng (@chillancezen)

  • Frank Shen (@fshen01)

  • Hongbin Lu (@fgtdev-hblu)

集合链接

  • 问题跟踪器
  • 主页
  • 存储库(来源)
上一个 下一个

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