Skip to content

Instantly share code, notes, and snippets.

@gil-obradors
Created December 23, 2018 19:29
Show Gist options
  • Save gil-obradors/c2e2a8b45fdc7c502f203589c93f2945 to your computer and use it in GitHub Desktop.
Save gil-obradors/c2e2a8b45fdc7c502f203589c93f2945 to your computer and use it in GitHub Desktop.
Mikrotik Playbook
---
- name: prova routers_commands
hosts: mikrotik
connection: network_cli
remote_user: guifibages
gather_facts: false
tasks:
- name: run command on remote devices
routeros_command:
commands: /system routerboard print
- name: run command and check to see if output contains routeros
routeros_command:
commands: /system resource print
wait_for: result[0] contains MikroTik
- name: run multiple commands on remote nodes
routeros_command:
commands:
- /system routerboard print
- /system identity print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment