From b322351c1179eab31d496d6a00b4b804a6895950 Mon Sep 17 00:00:00 2001 From: Egor Zaitsev Date: Fri, 18 Dec 2020 15:12:08 +0300 Subject: [PATCH] docs: add note about hostnames and nested commands (#16) * docs: add note about hostnames and nested commands * docs: clarify command nesting * Update README.md Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 09b88ec4..17faa10c 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,17 @@ See [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_gui There are two approaches for using this collection. The `command` and `facts` modules use the `network_cli` connection and connect with SSH. The `api` module connects with the HTTP/HTTPS API. +### Prerequisites + +The terminal-based modules in this collection (`community.routeros.command` and `community.routeros.facts`) do not support arbitrary symbols in router's identity. If you are having trouble connecting to your device, please make sure that your MikroTik's identity contains only alphanumeric characters and dashes. Also, the `community.routeros.command` module does not support nesting commands and expects every command to start with a forward slash (`/`). Running the following command will produce an error. + +```yaml +- community.routeros.command: + commands: + - /ip + - print +``` + ### Connecting with `network_cli` Example inventory `hosts` file: