I am using Ansible on my Debian client machine. I am trying to setup inventory file and ansible playbook for showing simple version of local devices from remote site that is behind NAT by using jumphost (bastion) which is my mikrotik/routeros using ssh called "jumphost" and then connect to final local mikrotik routeros switch called "localswitch" I get the following error: "msg": "ssh connection failed: ssh connect failed: Socket error: Connection reset by peer"
Please help by using ansible_ssh_common_args for routeros as jumphost
inventory.yaml
all:
switches:
hosts:
localswitch.company.local:
vars:
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q myuser@jumphost.company.com"'
playbook.yaml:
- hosts: all
connection: network_cli
gather_facts: true
vars:
ansible_network_os: routeros
tasks:
- name: Print RouterBoard version
routeros_command:
commands:
- /system routerboard print
register: result
- name: Display command output
debug:
var: result.stdout_lines