community.routeros.split filter – Split a command into arguments

Note

This filter plugin is part of the community.routeros collection (version 3.0.0).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.routeros.

To use it in a playbook, specify: community.routeros.split.

New in community.routeros 2.0.0

Synopsis

  • Split a command into arguments.

Input

This describes the input of the filter, the value before | community.routeros.split.

Parameter

Comments

Input

string / required

A command.

Examples

- name: Split command into list of arguments
  ansible.builtin.set_fact:
    argument_list: "{{ 'foo=bar comment="foo is bar" baz' | community.routeros.split }}"
    # Should result in ['foo=bar', 'comment=foo is bar', 'baz']

Return Value

Key

Description

Return value

list / elements=string

The list of arguments.

Returned: success

Authors

  • Felix Fontein (@felixfontein)

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.