• 博客
  • 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 命名空间中的集合
    • Dell EMC 命名空间中的集合
    • F5 Networks 命名空间中的集合
    • Fortinet 命名空间中的集合
      • Fortinet.Fortimanager
        • 描述
        • 插件索引
      • Fortinet.Fortios
    • FRR 命名空间中的集合
    • Gluster 命名空间中的集合
    • Google 命名空间中的集合
    • Grafana 命名空间中的集合
    • Hetzner 命名空间中的集合
    • HPE 命名空间中的集合
    • IBM 命名空间中的集合
    • IEISystem 命名空间中的集合
    • Infinidat 命名空间中的集合
    • Infoblox 命名空间中的集合
    • Inspur 命名空间中的集合
    • Juniper Networks 命名空间中的集合
    • Kaytus 命名空间中的集合
    • Kubernetes 命名空间中的集合
    • KubeVirt 命名空间中的集合
    • LowlyDBA 命名空间中的集合
    • Mellanox 命名空间中的集合
    • Microsoft 命名空间中的集合
    • NetApp 命名空间中的集合
    • NetApp_eSeries 命名空间中的集合
    • NetBox 命名空间中的集合
    • NGINX IO 命名空间中的集合
    • OpenStack 命名空间中的集合
    • Open vSwitch 命名空间中的集合
    • oVirt 命名空间中的集合
    • PureStorage 命名空间中的集合
    • Sensu 命名空间中的集合
    • ServiceNow 命名空间中的集合
    • Splunk 命名空间中的集合
    • T_Systems_MMS 命名空间中的集合
    • Telekom_MMS 命名空间中的集合
    • The Foreman 命名空间中的集合
    • VMware 命名空间中的集合
    • Vultr 命名空间中的集合
    • VyOS 命名空间中的集合
    • WTI 命名空间中的集合
  • 所有模块和插件的索引
  • 剧本关键字
  • 返回值
  • 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_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

任意

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

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

字符串

DiffServ 代码转发。

diffservcode_rev

别名:diffservcode-rev

字符串

DiffServ 代码反向。

dlp_sensor

别名:dlp-sensor

任意

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

dnsfilter_profile

别名: dnsfilter-profile

任意

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

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_negate

别名: dstaddr-negate

字符串

目的地址取反。

选项

  • "disable"

  • "enable"

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

字符串

杀毒配置文件。

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

字符串

SSL VPN 门户。

sslvpn_realm

别名: sslvpn-realm

字符串

SSL VPN 领域。

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

字符串

网页过滤配置文件。

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

任意

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

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"

status

字符串

状态。

选项

  • "disable"

  • "enable"

tags

任意

(列表或字符串) 标签。

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

任意

(列表或字符串) 流量整形器。

traffic_shaper_reverse

别名: traffic-shaper-reverse

任意

(列表或字符串) 反向流量整形器。

url_category

别名: url-category

任意

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

users

任意

(列表或字符串) 用户。

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

任意

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

vpntunnel

任意

(列表或字符串) VPN隧道。

waf_profile

别名: waf-profile

任意

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

webcache

字符串

Web缓存。

选项

  • "disable"

  • "enable"

webcache_https

别名: webcache-https

字符串

Web缓存HTTPS。

选项

  • "disable"

  • "enable"

webfilter_profile

别名: webfilter-profile

任意

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

webproxy_forward_server

别名: webproxy-forward-server

任意

(列表或字符串) Web代理转发服务器。

webproxy_profile

别名: webproxy-profile

任意

(列表或字符串) Web代理配置文件。

proposed_method

字符串

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

选项

  • "update"

  • "set"

  • "add"

rc_failed

列表 / 元素=整数

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

rc_succeeded

列表 / 元素=整数

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

state

字符串 / 必需

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

选项

  • "present"

  • "absent"

workspace_locking_adom

字符串

在工作区模式下锁定FortiManager的ADOM,值可以是全局的和其他包括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

列表 / 元素=字符串

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

返回:复杂

作者

  • 杜欣伟 (@dux-fortinet)

  • 李星 (@lix-fortinet)

  • 薛杰 (@JieX19)

  • 郑琳 (@chillancezen)

  • 沈峰 (@fshen01)

  • 卢宏斌 (@fgtdev-hblu)

集合链接

  • 问题跟踪器
  • 主页
  • 代码库(源代码)
上一页 下一页

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