community.routeros.split filter – Split a command into arguments
Note
This filter plugin is part of the community.routeros collection (version 2.11.0).
You might already have this collection installed if you are using the ansible
package.
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 |
---|---|
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 |
---|---|
The list of arguments. Returned: success |