fortinet.fortimanager.fmgr_system_npu_nputcam 模块 – 配置 NPU TCAM 策略。
注意
此模块是 fortinet.fortimanager 集合 (版本 2.8.2) 的一部分。
如果您使用的是 ansible
包,则可能已安装此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install fortinet.fortimanager
。
要在 playbook 中使用它,请指定: fortinet.fortimanager.fmgr_system_npu_nputcam
。
fortinet.fortimanager 2.4.0 中的新增功能
概要
此模块能够配置 FortiManager 设备。
示例包含所有参数和值,在使用前需要根据数据源进行调整。
参数
参数 |
注释 |
---|---|
无需使用用户名和密码即可访问 FortiManager 的令牌。 |
|
请求 URL 中的参数 (adom)。 |
|
仅当模块模式与 FortiManager API 结构不同时才设置为 True,模块将继续执行而无需验证参数。 选项
|
|
启用/禁用任务日志记录。 选项
|
|
使用 FortiCloud API 访问令牌验证 Ansible 客户端。 |
|
底层 Json RPC 请求的覆盖方法。 选项
|
|
将覆盖失败条件的 rc 代码列表。 |
|
将覆盖成功条件的 rc 代码列表。 |
|
创建、更新或删除对象的指令。 选项
|
|
设置的顶级参数。 |
|
数据。 |
|
TCAM 数据 IP 标志 df。 选项
|
|
TCAM 数据目标 IPv4 地址。 |
|
TCAM 数据目标 IPv6 地址。 |
|
TCAM 数据目标 MAC 地址。 |
|
TCAM 数据 L4 目标端口。 |
|
TCAM 数据以太网类型。 |
|
TCAM 数据扩展标签。 选项
|
|
TCAM 数据 IP 标志分片偏移。 |
|
TCAM 数据生成信息缓冲区计数。 |
|
TCAM 数据生成信息 IV。 选项
|
|
TCAM 数据生成信息 L3 标志。 |
|
TCAM 数据生成信息 L4 标志。 |
|
TCAM 数据生成信息数据包控制。 |
|
TCAM 数据生成信息优先级。 |
|
TCAM 数据生成信息优先级有效性。 选项
|
|
TCAM 数据生成信息 TV。 选项
|
|
TCAM 数据 IPv4 IHL。 |
|
TCAM 数据 IPv4 ID。 |
|
TCAM 数据 IPv6 流标签。 |
|
TCAM 数据 IP 头版本。 |
|
TCAM 数据 L4 字节 10。 |
|
TCAM 数据 L4 字节 11。 |
|
TCAM 数据 L4 字节 8。 |
|
Tcam 数据 L4 word9。 |
|
Tcam 数据 IP 标志 mf。 选项
|
|
Tcam 数据 IP 协议。 |
|
Tcam 数据子链路。 |
|
Tcam 数据源 MAC 地址变更。 选项
|
|
Tcam 数据源端口。 |
|
Tcam 数据源 cfi。 选项
|
|
Tcam 数据源优先级。 |
|
Tcam 数据源更新。 选项
|
|
Tcam 数据源 IPv4 地址。 |
|
Tcam 数据源 IPv6 地址。 |
|
Tcam 数据源 MAC 地址。 |
|
Tcam 数据 L4 源端口。 |
|
Tcam 数据源 VID。 |
|
Tcam 数据 TCP 标志 ack。 选项
|
|
Tcam 数据 TCP 标志 cwr。 选项
|
|
Tcam 数据 TCP 标志 ece。 选项
|
|
Tcam 数据 TCP 标志 fin。 选项
|
|
Tcam 数据 TCP 标志 push。 选项
|
|
Tcam 数据 TCP 标志 rst。 选项
|
|
Tcam 数据 TCP 标志 syn。 选项
|
|
Tcam 数据 TCP 标志 urg。 选项
|
|
Tcam 数据目标 cfi。 选项
|
|
Tcam 数据目标优先级。 |
|
Tcam 数据目标端口更新。 选项
|
|
Tcam 数据目标有效性。 选项
|
|
Tcam 数据 IP tos。 |
|
Tcam 数据目标端口。 |
|
Tcam 数据 IP ttl。 |
|
Tcam 数据目标 VID。 |
|
Tcam 数据 VDOM ID。 |
|
调试驱动程序转储数据/掩码 pdq。 |
|
掩码。 |
|
Tcam 掩码 IP 标志 df。 选项
|
|
Tcam 掩码目标 IPv4 地址。 |
|
Tcam 掩码目标 IPv6 地址。 |
|
Tcam 掩码目标 MAC 地址。 |
|
Tcam 掩码 L4 目标端口。 |
|
Tcam 掩码以太网类型。 |
|
Tcam 掩码扩展标签。 选项
|
|
TCAM 数据 IP 标志分片偏移。 |
|
Tcam 掩码通用信息缓冲区计数。 |
|
Tcam 掩码通用信息 IV。 选项
|
|
Tcam 掩码通用信息 L3 标志。 |
|
Tcam 掩码通用信息 L4 标志。 |
|
Tcam 掩码通用信息数据包控制。 |
|
Tcam 掩码通用信息优先级。 |
|
Tcam 掩码通用信息优先级有效性。 选项
|
|
Tcam 掩码通用信息 tv。 选项
|
|
Tcam 掩码 IPv4 IHL。 |
|
Tcam 掩码 IPv4 ID。 |
|
Tcam 掩码 IPv6 流标签。 |
|
Tcam 掩码 IP 头版本。 |
|
Tcam 掩码 L4 word10。 |
|
Tcam 掩码 L4 word11。 |
|
Tcam 掩码 L4 word8。 |
|
Tcam 掩码 L4 word9。 |
|
Tcam 掩码 IP 标志 mf。 选项
|
|
Tcam 掩码 IP 协议。 |
|
Tcam 掩码子链路。 |
|
Tcam 掩码源 MAC 地址变更。 选项
|
|
Tcam 掩码源端口。 |
|
Tcam 掩码源 cfi。 选项
|
|
Tcam 掩码源优先级。 |
|
Tcam 掩码源更新。 选项
|
|
Tcam 掩码源 IPv4 地址。 |
|
Tcam 掩码源 IPv6 地址。 |
|
Tcam 掩码源 MAC 地址。 |
|
Tcam 掩码 L4 源端口。 |
|
Tcam 掩码源 VID。 |
|
Tcam 掩码 TCP 标志 ack。 选项
|
|
Tcam 掩码 TCP 标志 cwr。 选项
|
|
Tcam 掩码 TCP 标志 ece。 选项
|
|
Tcam 掩码 TCP 标志 fin。 选项
|
|
Tcam 掩码 TCP 标志 push。 选项
|
|
Tcam 掩码 TCP 标志 rst。 选项
|
|
Tcam 掩码 TCP 标志 syn。 选项
|
|
Tcam 掩码 TCP 标志 urg。 选项
|
|
Tcam 掩码目标 cfi。 选项
|
|
Tcam 掩码目标优先级。 |
|
Tcam 掩码目标端口更新。 选项
|
|
Tcam 掩码目标有效性。 选项
|
|
Tcam 掩码 IP tos。 |
|
Tcam 掩码目标端口。 |
|
Tcam 掩码 IP ttl。 |
|
Tcam 掩码目标 VID。 |
|
Tcam 掩码 VDOM ID。 |
|
镜像动作。 |
|
Tcam 镜像动作 VLIF。 |
|
NPU TCAM策略名称。 |
|
NPU TCAM OID。 |
|
优先级动作。 |
|
Tcam 优先级动作优先级。 |
|
Tcam 优先级动作权重。 |
|
Sact。 |
|
Tcam sact 动作。 |
|
启用设置 sact 动作。 选项
|
|
Tcam sact bmproc。 |
|
启用设置 sact bmproc。 选项
|
|
Tcam sact df-lif。 |
|
启用设置 sact df-lif。 选项
|
|
Tcam sact dfr。 |
|
启用设置 sact dfr。 选项
|
|
Tcam sact dmac-skip。 |
|
启用设置 sact dmac-skip。 选项
|
|
Tcam sact dosen。 |
|
启用设置 sact dosen。 选项
|
|
TCAM sact espff-proc。 |
|
启用设置 sact espff-proc。 选项
|
|
TCAM sact etype-pid。 |
|
启用设置 sact etype-pid。 选项
|
|
TCAM sact frag-proc。 |
|
启用设置 sact frag-proc。 选项
|
|
TCAM sact fwd。 |
|
TCAM sact fwd-lif。 |
|
启用设置 sact fwd-lif。 选项
|
|
TCAM sact fwd-tvid。 |
|
启用设置 sact fwd-vid。 选项
|
|
启用设置 sact fwd。 选项
|
|
TCAM sact icpen。 |
|
启用设置 sact icpen。 选项
|
|
TCAM sact igmp-mld-snp。 |
|
启用设置 sact igmp-mld-snp。 选项
|
|
TCAM sact learn。 |
|
启用设置 sact learn。 选项
|
|
TCAM sact m-srh-ctrl。 |
|
启用设置 sact m-srh-ctrl。 选项
|
|
TCAM sact mac-id。 |
|
启用设置 sact mac-id。 选项
|
|
TCAM sact mss。 |
|
启用设置 sact mss。 选项
|
|
TCAM sact pleen。 |
|
启用设置 sact pleen。 选项
|
|
TCAM sact prio-pid。 |
|
启用设置 sact prio-pid。 选项
|
|
TCAM sact promis。 |
|
启用设置 sact promis。 选项
|
|
TCAM sact rfsh。 |
|
启用设置 sact rfsh。 选项
|
|
TCAM sact smac-skip。 |
|
启用设置 sact smac-skip。 选项
|
|
TCAM sact tp 模式。 |
|
启用设置 sact tp 模式。 选项
|
|
TCAM sact tpe-id。 |
|
启用设置 sact tpe-id。 选项
|
|
TCAM sact vdm。 |
|
启用设置 sact vdm。 选项
|
|
TCAM sact vdom-id。 |
|
启用设置 sact vdom-id。 选项
|
|
TCAM sact x-mode。 |
|
启用设置 sact x-mode。 选项
|
|
Tact。 |
|
TCAM tact act。 |
|
启用设置 tact act。 选项
|
|
TCAM tact fmtuv4-s。 |
|
启用设置 tact fmtuv4-s。 选项
|
|
TCAM tact fmtuv6-s。 |
|
启用设置 tact fmtuv6-s。 选项
|
|
TCAM tact lnkid。 |
|
启用设置 tact lnkid。 选项
|
|
TCAM tact mac-id。 |
|
启用设置 tact mac-id。 选项
|
|
TCAM tact mss。 |
|
启用设置 tact mss。 选项
|
|
TCAM tact mtuv4。 |
|
启用设置 tact mtuv4。 选项
|
|
TCAM tact mtuv6。 |
|
启用设置 tact mtuv6。 选项
|
|
TCAM tact slif-act。 |
|
启用设置 tact slif-act。 选项
|
|
TCAM tact sublnkid。 |
|
启用设置 tact sublnkid。 选项
|
|
TCAM tact tgtv-act。 |
|
启用设置 tact tgtv-act。 选项
|
|
TCAM tact tlif-act。 |
|
启用设置 tact tlif-act。 选项
|
|
TCAM tact tpeid。 |
|
启用设置 tact tpeid。 选项
|
|
TCAM tact v6fe。 |
|
启用设置 tact v6fe。 选项
|
|
TCAM tact vep_en。 |
|
启用设置 tact vep-en。 选项
|
|
TCAM tact vep_slid。 |
|
启用设置 tact vep-slid。 选项
|
|
TCAM tact xlt-lif。 |
|
启用设置 tact xlt-lif。 选项
|
|
TCAM tact xlt-vid。 |
|
启用设置 tact xlt-vid。 选项
|
|
TCAM策略类型。 选项
|
|
NPU TCAM VID。 |
|
FortiManager在工作区模式下运行时要锁定的ADOM,值可以是全局的和其他值,包括root。 |
|
等待其他用户释放工作区锁的最大时间(秒)。 默认值: |
备注
注意
从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 (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: Configure NPU TCAM policies.
fortinet.fortimanager.fmgr_system_npu_nputcam:
# 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>
state: present # <value in [present, absent]>
system_npu_nputcam:
data:
df: <value in [disable, enable]>
dstip: <string>
dstipv6: <string>
dstmac: <string>
dstport: <integer>
ethertype: <string>
ext_tag: <value in [disable, enable]>
frag_off: <integer>
gen_buf_cnt: <integer>
gen_iv: <value in [invalid, valid]>
gen_l3_flags: <integer>
gen_l4_flags: <integer>
gen_pkt_ctrl: <integer>
gen_pri: <integer>
gen_pri_v: <value in [invalid, valid]>
gen_tv: <value in [invalid, valid]>
ihl: <integer>
ip4_id: <integer>
ip6_fl: <integer>
ipver: <integer>
l4_wd10: <integer>
l4_wd11: <integer>
l4_wd8: <integer>
l4_wd9: <integer>
mf: <value in [disable, enable]>
protocol: <integer>
slink: <integer>
smac_change: <value in [disable, enable]>
sp: <integer>
src_cfi: <value in [disable, enable]>
src_prio: <integer>
src_updt: <value in [disable, enable]>
srcip: <string>
srcipv6: <string>
srcmac: <string>
srcport: <integer>
svid: <integer>
tcp_ack: <value in [disable, enable]>
tcp_cwr: <value in [disable, enable]>
tcp_ece: <value in [disable, enable]>
tcp_fin: <value in [disable, enable]>
tcp_push: <value in [disable, enable]>
tcp_rst: <value in [disable, enable]>
tcp_syn: <value in [disable, enable]>
tcp_urg: <value in [disable, enable]>
tgt_cfi: <value in [disable, enable]>
tgt_prio: <integer>
tgt_updt: <value in [disable, enable]>
tgt_v: <value in [invalid, valid]>
tos: <integer>
tp: <integer>
ttl: <integer>
tvid: <integer>
vdid: <integer>
dbg_dump: <integer>
mask:
df: <value in [disable, enable]>
dstip: <string>
dstipv6: <string>
dstmac: <string>
dstport: <integer>
ethertype: <string>
ext_tag: <value in [disable, enable]>
frag_off: <integer>
gen_buf_cnt: <integer>
gen_iv: <value in [invalid, valid]>
gen_l3_flags: <integer>
gen_l4_flags: <integer>
gen_pkt_ctrl: <integer>
gen_pri: <integer>
gen_pri_v: <value in [invalid, valid]>
gen_tv: <value in [invalid, valid]>
ihl: <integer>
ip4_id: <integer>
ip6_fl: <integer>
ipver: <integer>
l4_wd10: <integer>
l4_wd11: <integer>
l4_wd8: <integer>
l4_wd9: <integer>
mf: <value in [disable, enable]>
protocol: <integer>
slink: <integer>
smac_change: <value in [disable, enable]>
sp: <integer>
src_cfi: <value in [disable, enable]>
src_prio: <integer>
src_updt: <value in [disable, enable]>
srcip: <string>
srcipv6: <string>
srcmac: <string>
srcport: <integer>
svid: <integer>
tcp_ack: <value in [disable, enable]>
tcp_cwr: <value in [disable, enable]>
tcp_ece: <value in [disable, enable]>
tcp_fin: <value in [disable, enable]>
tcp_push: <value in [disable, enable]>
tcp_rst: <value in [disable, enable]>
tcp_syn: <value in [disable, enable]>
tcp_urg: <value in [disable, enable]>
tgt_cfi: <value in [disable, enable]>
tgt_prio: <integer>
tgt_updt: <value in [disable, enable]>
tgt_v: <value in [invalid, valid]>
tos: <integer>
tp: <integer>
ttl: <integer>
tvid: <integer>
vdid: <integer>
mir_act:
vlif: <integer>
name: <string>
oid: <integer>
pri_act:
priority: <integer>
weight: <integer>
sact:
act: <integer>
act_v: <value in [disable, enable]>
bmproc: <integer>
bmproc_v: <value in [disable, enable]>
df_lif: <integer>
df_lif_v: <value in [disable, enable]>
dfr: <integer>
dfr_v: <value in [disable, enable]>
dmac_skip: <integer>
dmac_skip_v: <value in [disable, enable]>
dosen: <integer>
dosen_v: <value in [disable, enable]>
espff_proc: <integer>
espff_proc_v: <value in [disable, enable]>
etype_pid: <integer>
etype_pid_v: <value in [disable, enable]>
frag_proc: <integer>
frag_proc_v: <value in [disable, enable]>
fwd: <integer>
fwd_lif: <integer>
fwd_lif_v: <value in [disable, enable]>
fwd_tvid: <integer>
fwd_tvid_v: <value in [disable, enable]>
fwd_v: <value in [disable, enable]>
icpen: <integer>
icpen_v: <value in [disable, enable]>
igmp_mld_snp: <integer>
igmp_mld_snp_v: <value in [disable, enable]>
learn: <integer>
learn_v: <value in [disable, enable]>
m_srh_ctrl: <integer>
m_srh_ctrl_v: <value in [disable, enable]>
mac_id: <integer>
mac_id_v: <value in [disable, enable]>
mss: <integer>
mss_v: <value in [disable, enable]>
pleen: <integer>
pleen_v: <value in [disable, enable]>
prio_pid: <integer>
prio_pid_v: <value in [disable, enable]>
promis: <integer>
promis_v: <value in [disable, enable]>
rfsh: <integer>
rfsh_v: <value in [disable, enable]>
smac_skip: <integer>
smac_skip_v: <value in [disable, enable]>
tp_smchk_v: <value in [disable, enable]>
tp_smchk: <integer>
tpe_id: <integer>
tpe_id_v: <value in [disable, enable]>
vdm: <integer>
vdm_v: <value in [disable, enable]>
vdom_id: <integer>
vdom_id_v: <value in [disable, enable]>
x_mode: <integer>
x_mode_v: <value in [disable, enable]>
tact:
act: <integer>
act_v: <value in [disable, enable]>
fmtuv4_s: <integer>
fmtuv4_s_v: <value in [disable, enable]>
fmtuv6_s: <integer>
fmtuv6_s_v: <value in [disable, enable]>
lnkid: <integer>
lnkid_v: <value in [disable, enable]>
mac_id: <integer>
mac_id_v: <value in [disable, enable]>
mss_t: <integer>
mss_t_v: <value in [disable, enable]>
mtuv4: <integer>
mtuv4_v: <value in [disable, enable]>
mtuv6: <integer>
mtuv6_v: <value in [disable, enable]>
slif_act: <integer>
slif_act_v: <value in [disable, enable]>
sublnkid: <integer>
sublnkid_v: <value in [disable, enable]>
tgtv_act: <integer>
tgtv_act_v: <value in [disable, enable]>
tlif_act: <integer>
tlif_act_v: <value in [disable, enable]>
tpeid: <integer>
tpeid_v: <value in [disable, enable]>
v6fe: <integer>
v6fe_v: <value in [disable, enable]>
vep_en_v: <value in [disable, enable]>
vep_slid: <integer>
vep_slid_v: <value in [disable, enable]>
vep_en: <integer>
xlt_lif: <integer>
xlt_lif_v: <value in [disable, enable]>
xlt_vid: <integer>
xlt_vid_v: <value in [disable, enable]>
type: <value in [L2_src_tc, L2_tgt_tc, L2_src_mir, ...]>
vid: <integer>
返回值
常见的返回值已在此处记录,以下是此模块特有的字段
键 |
描述 |
---|---|
请求的结果。 返回值: 始终 |
|
请求的完整URL。 返回值: 始终 示例: |
|
API请求的状态。 返回值: 始终 示例: |
|
API响应。 返回值: 始终 |
|
API响应的描述性消息。 返回值: 始终 示例: |
|
目标系统的信息。 返回值: 始终 |
|
请求的状态。 返回值: 始终 示例: |
|
如果剧本中使用的参数不受当前FortiManager版本支持,则会发出警告。 返回值: 复杂类型 |