community.routeros.join 过滤器 – 将参数列表连接成命令

注意

此过滤器插件是 community.routeros 集合(版本 3.1.0)的一部分。

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

要安装它,请使用: ansible-galaxy collection install community.routeros

要在 playbook 中使用它,请指定: community.routeros.join

community.routeros 2.0.0 中的新增功能

概要

  • 连接并引用命令的参数列表。

输入

这描述了过滤器的输入,即 | community.routeros.join 之前的数值。

参数

注释

输入

list / elements=string / required

要引用和连接的参数列表。

示例

- name: Join arguments for a RouterOS CLI command
  ansible.builtin.set_fact:
    arguments: "{{ ['foo=bar', 'comment=foo is bar'] | community.routeros.join }}"
    # Should result in 'foo=bar comment="foo is bar"'

返回值

描述

返回值

字符串

连接和引用后的结果。

返回: 成功

作者

  • Felix Fontein (@felixfontein)

提示

每种条目类型的配置条目都具有从低到高的优先级顺序。例如,列表中较低的变量将覆盖较高的变量。