community.routeros.quote_argument filter – Quote an argument
Note
This filter plugin is part of the community.routeros collection (version 2.19.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.quote_argument
.
New in community.routeros 2.0.0
Synopsis
Quote an argument.
Input
This describes the input of the filter, the value before | community.routeros.quote_argument
.
Parameter |
Comments |
---|---|
An argument to quote. |
Examples
- name: Quote a RouterOS CLI command argument
ansible.builtin.set_fact:
quoted: "{{ 'comment=this is a "comment"' | community.routeros.quote_argument }}"
# Should result in 'comment="this is a \"comment\""'
Return Value
Key |
Description |
---|---|
The quoted argument. Returned: success |