29 lines
1.2 KiB
YAML
29 lines
1.2 KiB
YAML
---
|
|
|
|
# Test mikrotik
|
|
|
|
- name: Universal Request
|
|
hosts: test
|
|
|
|
tasks:
|
|
|
|
- name: COnfig Devises
|
|
routeros_command:
|
|
#commands: /ip route add dst-address=10.4.0.214 gateway=l2tp-to-p11
|
|
#commands: :execute {/system reboot;}
|
|
#commands: :global test [ip route find dst-address ="10.4.0.214/32"]; \ :if ($test != "") do= { log info ROUTE_IN_TABLE; } \ else= { /ip route add dst-address=10.4.0.214/32 gateway=l2tp-to-p11; }
|
|
#commands: :global test [ip route find dst-address ="192.168.8.99/32"]; \ :if ($test != "") do= { log info ROUTE_IN_TABLE; } \ else= { /ip route add dst-address=192.168.8.99/32 gateway=l2tp-to-p11; }
|
|
#commands: /system package update download
|
|
# commands: /system identity set name={{hostname}}
|
|
#commands: /system routerboard settings set auto-upgrade=yes
|
|
#commands: /snmp set enabled=yes
|
|
# commands: /snmp community add name=lmTUEsk6Yvlv addresses=0.0.0.0/0 read-access=yes write-access=no
|
|
# commands: :execute {/system reboot;}
|
|
commands: /ip address print
|
|
register: version_output
|
|
|
|
|
|
- name: Display facts variables
|
|
debug:
|
|
var: version_output.stdout_lines
|