Advertisement
ZX_CV

check_SSH.yaml

Apr 28th, 2024
811
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.53 KB | None | 0 0
  1. check_SSH.yaml
  2.  
  3. ---
  4. - name: RouterOS test with network_cli connection
  5.   hosts: routers
  6.   gather_facts: false
  7.   tasks:
  8.   - name: Gather system resources
  9.     community.routeros.command:
  10.       commands:
  11.        - /system resource print
  12.     register: system_resource_print
  13.  
  14.   - name: Show system resources
  15.     debug:
  16.       var: system_resource_print.stdout_lines
  17.  
  18.   - name: Gather facts
  19.     community.routeros.facts:
  20.   - name: Show a fact
  21.     debug:
  22.       msg: "First IP address: {{ ansible_net_all_ipv4_addresses[0] }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement