Skip to content

Commit

Permalink
docs: add note about hostnames and nested commands (#16)
Browse files Browse the repository at this point in the history
* docs: add note about hostnames and nested commands

* docs: clarify command nesting

* Update README.md

Co-authored-by: Felix Fontein <[email protected]>

Co-authored-by: Felix Fontein <[email protected]>
  • Loading branch information
heuels and felixfontein authored Dec 18, 2020
1 parent fbc47fb commit b322351
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b322351

Please sign in to comment.