community.network.ce_netstream_template 模块 – 管理华为 CloudEngine 交换机上的 NetStream 模板配置。
注意
此模块是 community.network 集合 (版本 5.1.0) 的一部分。
如果您使用的是 ansible
包,则可能已安装此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install community.network
。
要在剧本中使用它,请指定:community.network.ce_netstream_template
。
注意
community.network 集合已弃用,并将从 Ansible 12 中移除。有关更多信息,请参阅 讨论主题。
已弃用
- 在以下版本中移除:
版本 6.0.0
- 原因:
此集合及其中的所有内容均未维护且已弃用。
- 替代方案:
未知。
摘要
管理华为 CloudEngine 交换机上的 NetStream 模板配置。
别名:network.cloudengine.ce_netstream_template
参数
参数 |
注释 |
---|---|
配置发送到 NSC 的灵活流统计信息中包含的数据包和字节数。 选项
|
|
配置发送到 NSC 的灵活流统计信息中包含的输入或输出接口。 选项
|
|
配置 netstream 记录的描述。值是一个 1 到 80 个字符的字符串(不区分大小写)。 |
|
配置灵活流统计模板关键字。 选项
|
|
配置 netstream 记录的名称。值是一个 1 到 32 个字符的字符串(不区分大小写)。 |
|
指定资源的所需状态。 选项
|
|
配置 netstream 记录的类型。 选项
|
备注
注意
推荐的连接是
network_cli
。此模块也适用于旧版剧本的
local
连接。
示例
- name: Netstream template module test
hosts: cloudengine
connection: local
gather_facts: false
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Config ipv4 netstream record
community.network.ce_netstream_template:
state: present
type: ip
record_name: test
provider: "{{ cli }}"
- name: Undo ipv4 netstream record
community.network.ce_netstream_template:
state: absent
type: ip
record_name: test
provider: "{{ cli }}"
- name: Config ipv4 netstream record collect_counter
community.network.ce_netstream_template:
state: present
type: ip
record_name: test
collect_counter: bytes
provider: "{{ cli }}"
- name: Undo ipv4 netstream record collect_counter
community.network.ce_netstream_template:
state: absent
type: ip
record_name: test
collect_counter: bytes
provider: "{{ cli }}"
返回值
此处记录了常见的返回值 此处,以下是此模块独有的字段
键 |
描述 |
---|---|
检查设备上是否进行了更改 返回:始终 示例: |
|
模块执行后 aaa 参数的键值对 返回:始终 示例: |
|
现有 aaa 服务器的键值对 返回:始终 示例: |
|
传递给模块的参数的键值对 返回:始终 示例: |
|
发送到设备的命令 返回:始终 示例: |
状态
此模块将在 6.0.0 版本中移除。 *[已弃用]*
有关更多信息,请参见 已弃用。