fortinet.fortimanager.fmgr_fsp_vlan_interface_ipv6 模块 – 接口的 IPv6。

注意

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

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

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

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

fortinet.fortimanager 2.0.0 中的新增功能

概要

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

  • 示例包括所有需要在使用前调整为数据源的参数和值。

参数

参数

注释

access_token

字符串

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

adom

字符串 / 必需

请求 URL 中的参数 (adom)。

bypass_validation

布尔值

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

选项

  • false ← (默认)

  • true

enable_log

布尔值

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

选项

  • false ← (默认)

  • true

forticloud_access_token

字符串

使用 forticloud API 访问令牌验证 Ansible 客户端。

fsp_vlan_interface_ipv6

字典

设置的顶级参数。

autoconf

字符串

自动配置。

选项

  • "disable"

  • "enable"

cli_conn6_status

别名:cli-conn6-status

整数

Cli conn6 状态。

dhcp6_client_options

别名:dhcp6-client-options

列表 / 元素=字符串

Dhcp6 客户端选项。

选项

  • "rapid"

  • "iapd"

  • "iana"

  • "dns"

  • "dnsname"

dhcp6_information_request

别名:dhcp6-information-request

字符串

Dhcp6 信息请求。

选项

  • "disable"

  • "enable"

dhcp6_prefix_delegation

别名:dhcp6-prefix-delegation

字符串

Dhcp6 前缀委派。

选项

  • "disable"

  • "enable"

dhcp6_prefix_hint

别名:dhcp6-prefix-hint

字符串

Dhcp6 前缀提示。

dhcp6_prefix_hint_plt

别名:dhcp6-prefix-hint-plt

整数

Dhcp6 前缀提示 plt。

dhcp6_prefix_hint_vlt

别名:dhcp6-prefix-hint-vlt

整数

Dhcp6 前缀提示 vlt。

dhcp6_relay_interface_id

别名:dhcp6-relay-interface-id

字符串

DHCP6 中继接口 ID。

dhcp6_relay_ip

别名:dhcp6-relay-ip

字符串

Dhcp6 中继 IP。

dhcp6_relay_service

别名:dhcp6-relay-service

字符串

Dhcp6 中继服务。

选项

  • "disable"

  • "enable"

dhcp6_relay_source_interface

别名:dhcp6-relay-source-interface

字符串

启用/禁用将此接口上的地址用作中继消息的源地址。

选项

  • "disable"

  • "enable"

dhcp6_relay_source_ip

别名:dhcp6-relay-source-ip

字符串

DHCP6 中继用作其源 IP 的 IPv6 地址。

dhcp6_relay_type

别名:dhcp6-relay-type

字符串

Dhcp6 中继类型。

选项

  • "regular"

icmp6_send_redirect

别名:icmp6-send-redirect

字符串

启用/禁用发送 ICMPv6 重定向。

选项

  • "disable"

  • "enable"

interface_identifier

别名:interface-identifier

字符串

接口标识符。

ip6_address

别名:ip6-address

字符串

Ip6 地址。

ip6_allowaccess

别名:ip6-allowaccess

列表 / 元素=字符串

Ip6 允许访问。

选项

  • "https"

  • "ping"

  • "ssh"

  • "snmp"

  • "http"

  • "telnet"

  • "fgfm"

  • "capwap"

  • "fabric"

ip6_default_life

别名:ip6-default-life

整数

Ip6 默认生存期。

ip6_delegated_prefix_iaid

别名:ip6-delegated-prefix-iaid

整数

从上游接口获得的委托前缀的 IAID。

ip6_delegated_prefix_list

别名:ip6-delegated-prefix-list

列表 / 元素=字典

Ip6 委托前缀列表。

autonomous_flag

别名:autonomous-flag

字符串

自主标志。

选项

  • "disable"

  • "enable"

delegated_prefix_iaid

别名:delegated-prefix-iaid

整数

从上游接口获得的委托前缀的 IAID。

onlink_flag

别名:onlink-flag

字符串

Onlink 标志。

选项

  • "disable"

  • "enable"

prefix_id

别名:prefix-id

整数

前缀 ID。

rdnss

任意

(列表) Rdnss。

rdnss_service

别名:rdnss-service

字符串

Rdnss 服务。

选项

  • "delegated"

  • "default"

  • "specify"

子网

字符串

子网。

上行接口

别名: upstream-interface

字符串

上行接口。

Ip6 DNS服务器覆盖

别名: ip6-dns-server-override

字符串

Ip6 DNS服务器覆盖。

选项

  • "disable"

  • "enable"

Ip6额外地址

别名: ip6-extra-addr

列表 / 元素=字典

Ip6额外地址。

前缀

字符串

前缀。

Ip6跳数限制

别名: ip6-hop-limit

整数

Ip6跳数限制。

Ip6链路MTU

别名: ip6-link-mtu

整数

Ip6链路MTU。

Ip6管理标志

别名: ip6-manage-flag

字符串

Ip6管理标志。

选项

  • "disable"

  • "enable"

Ip6最大间隔

别名: ip6-max-interval

整数

Ip6最大间隔。

Ip6最小间隔

别名: ip6-min-interval

整数

Ip6最小间隔。

Ip6模式

别名: ip6-mode

字符串

Ip6模式。

选项

  • "静态"

  • "DHCP"

  • "PPPoE"

  • "delegated"

Ip6其他标志

别名: ip6-other-flag

字符串

Ip6其他标志。

选项

  • "disable"

  • "enable"

Ip6前缀列表

别名: ip6-prefix-list

列表 / 元素=字典

Ip6前缀列表。

自治标志

别名:autonomous-flag

字符串

自主标志。

选项

  • "disable"

  • "enable"

DNSSL

任意

(列表) DNSSL。

链路标志

别名:onlink-flag

字符串

Onlink 标志。

选项

  • "disable"

  • "enable"

首选生命周期

别名: preferred-life-time

整数

首选生命周期。

前缀

字符串

前缀。

RDNSS

任意

(列表) Rdnss。

有效生命周期

别名: valid-life-time

整数

有效生命周期。

Ip6前缀模式

别名: ip6-prefix-mode

字符串

从DHCP或RA分配前缀。

选项

  • "dhcp6"

  • "ra"

Ip6可达时间

别名: ip6-reachable-time

整数

Ip6可达时间。

Ip6重传时间

别名: ip6-retrans-time

整数

Ip6重传时间。

Ip6发送广告

别名: ip6-send-adv

字符串

Ip6发送广告。

选项

  • "disable"

  • "enable"

Ip6子网

别名: ip6-subnet

字符串

Ip6子网。

Ip6上行接口

别名: ip6-upstream-interface

字符串

Ip6上行接口。

ND证书

别名: nd-cert

字符串

ND证书。

ND CGA修饰符

别名: nd-cga-modifier

字符串

ND CGA修饰符。

ND模式

别名: nd-mode

字符串

ND模式。

选项

  • "基本"

  • "SEND兼容"

ND安全级别

别名: nd-security-level

整数

ND安全级别。

ND时间戳差值

别名: nd-timestamp-delta

整数

ND时间戳差值。

ND时间戳模糊值

别名: nd-timestamp-fuzz

整数

ND时间戳模糊值。

RA发送MTU

别名: ra-send-mtu

字符串

启用/禁用在RA数据包中发送链路MTU。

选项

  • "disable"

  • "enable"

唯一自动配置地址

别名: unique-autoconf-addr

字符串

唯一自动配置地址。

选项

  • "disable"

  • "enable"

字符串

Vrip6链路本地地址。

vrrp6

列表 / 元素=字典

VRRP6。

接受模式

别名: accept-mode

字符串

接受模式。

选项

  • "disable"

  • "enable"

广告间隔

别名: adv-interval

整数

广告间隔。

忽略默认路由

别名: ignore-default-route

字符串

启用/禁用在检查目标时忽略默认路由。

选项

  • "disable"

  • "enable"

抢占

字符串

抢占。

选项

  • "disable"

  • "enable"

优先级

整数

优先级。

启动时间

别名: start-time

整数

启动时间。

状态

字符串

状态。

选项

  • "disable"

  • "enable"

vrdst6

字符串

VRDST6。

VRDST优先级

别名: vrdst-priority

整数

虚拟路由器目标不可达时虚拟路由器的优先级

vrgrp

整数

VRGRP。

vrid

整数

VRID。

vrip6

字符串

VRIP6。

VRRP虚拟MAC6

别名: vrrp-virtual-mac6

字符串

VRRP虚拟MAC6。

选项

  • "disable"

  • "enable"

建议方法

字符串

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

选项

  • "更新"

  • "设置"

  • "添加"

rc_failed

列表 / 元素=整数

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

rc_succeeded

列表 / 元素=整数

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

vlan

字符串 / 必需

请求URL中的参数(vlan)。

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有助于完成此工作。

  • 通常,当返回非零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: IPv6 of interface.
      fortinet.fortimanager.fmgr_fsp_vlan_interface_ipv6:
        # 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>
        vlan: <your own value>
        fsp_vlan_interface_ipv6:
          autoconf: <value in [disable, enable]>
          dhcp6_client_options:
            - "rapid"
            - "iapd"
            - "iana"
            - "dns"
            - "dnsname"
          dhcp6_information_request: <value in [disable, enable]>
          dhcp6_prefix_delegation: <value in [disable, enable]>
          dhcp6_prefix_hint: <string>
          dhcp6_prefix_hint_plt: <integer>
          dhcp6_prefix_hint_vlt: <integer>
          dhcp6_relay_ip: <string>
          dhcp6_relay_service: <value in [disable, enable]>
          dhcp6_relay_type: <value in [regular]>
          ip6_address: <string>
          ip6_allowaccess:
            - "https"
            - "ping"
            - "ssh"
            - "snmp"
            - "http"
            - "telnet"
            - "fgfm"
            - "capwap"
            - "fabric"
          ip6_default_life: <integer>
          ip6_dns_server_override: <value in [disable, enable]>
          ip6_hop_limit: <integer>
          ip6_link_mtu: <integer>
          ip6_manage_flag: <value in [disable, enable]>
          ip6_max_interval: <integer>
          ip6_min_interval: <integer>
          ip6_mode: <value in [static, dhcp, pppoe, ...]>
          ip6_other_flag: <value in [disable, enable]>
          ip6_reachable_time: <integer>
          ip6_retrans_time: <integer>
          ip6_send_adv: <value in [disable, enable]>
          ip6_subnet: <string>
          ip6_upstream_interface: <string>
          nd_cert: <string>
          nd_cga_modifier: <string>
          nd_mode: <value in [basic, SEND-compatible]>
          nd_security_level: <integer>
          nd_timestamp_delta: <integer>
          nd_timestamp_fuzz: <integer>
          vrip6_link_local: <string>
          vrrp_virtual_mac6: <value in [disable, enable]>
          ip6_delegated_prefix_list:
            -
              autonomous_flag: <value in [disable, enable]>
              onlink_flag: <value in [disable, enable]>
              prefix_id: <integer>
              rdnss: <list or string>
              rdnss_service: <value in [delegated, default, specify]>
              subnet: <string>
              upstream_interface: <string>
              delegated_prefix_iaid: <integer>
          ip6_extra_addr:
            -
              prefix: <string>
          ip6_prefix_list:
            -
              autonomous_flag: <value in [disable, enable]>
              dnssl: <list or string>
              onlink_flag: <value in [disable, enable]>
              preferred_life_time: <integer>
              prefix: <string>
              rdnss: <list or string>
              valid_life_time: <integer>
          vrrp6:
            -
              accept_mode: <value in [disable, enable]>
              adv_interval: <integer>
              preempt: <value in [disable, enable]>
              priority: <integer>
              start_time: <integer>
              status: <value in [disable, enable]>
              vrdst6: <string>
              vrgrp: <integer>
              vrid: <integer>
              vrip6: <string>
              ignore_default_route: <value in [disable, enable]>
              vrdst_priority: <integer>
          interface_identifier: <string>
          unique_autoconf_addr: <value in [disable, enable]>
          icmp6_send_redirect: <value in [disable, enable]>
          cli_conn6_status: <integer>
          ip6_prefix_mode: <value in [dhcp6, ra]>
          ra_send_mtu: <value in [disable, enable]>
          ip6_delegated_prefix_iaid: <integer>
          dhcp6_relay_source_interface: <value in [disable, enable]>
          dhcp6_relay_interface_id: <string>
          dhcp6_relay_source_ip: <string>

返回值

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

描述

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)