Note
This filter plugin is part of the community.routeros collection (version 3.9.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
This describes the input of the filter, the value before | community.routeros.quote_argument.
Parameter | Comments |
|---|---|
Input string / required | An argument to quote. |
---
- 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\""'
Key | Description |
|---|---|
Return value string | The quoted argument. Returned: success |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/routeros/quote_argument_filter.html