Hello guys,
I’m deploying a new playbook in order to provision some devices and working with netconify is working fine, but when i want to upgrade the junos through the jump server i’m having issues with paramiko authentication. It is failing no matter is I use keys or password it just doesn’t work.
I have a ssh tunnel to the device using ./.ssh/config like this
Host tunnel
Hostname jumpbox
ForwardX11Trusted yes
LocalForward 8001 10.210.0.157:22
ControlPath ~/.ssh/master-%l-%r@jumpbox:%p
ControlMaster auto
Host distant
User local
Hostname localhost
Port 8001
ForwardX11Trusted yes
Host *
ForwardAgent yes
Protocol 2
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
On the jump box my ./.ssh/config is like this
Host *
ForwardX11Trusted yes
ForwardAgent yes
Protocol 2
SO basically I want to use the module junos_install_os in order to upgrade the switches. The module junos_install_config is working fine it load merges the configuration and commits with no issue through the ssh tunnel and the playboom looks like this.
- name: Load merge a configuration to a device running Junos OS
hosts: local
roles: - Juniper.junos
connection: local
gather_facts: no
vars:
user: local,
password: pass
hostname: distanthost
hostnameip: 127.0.0.1
port: 8001
tasks:
- name: load merge a configuration file
junos_install_config:
host={{ hostnameip }}
file=/Users/lab/Documents/Ansible-Configs/{{ hostname }}.txt
user={{ user }}
passwd={{ password }}
port={{ port }}
overwrite=true
logfile=/usr/local/etc/ansible/logs/{{ hostname }}.log
Like I said this one is working just fine. So when I try to use the module junos_install_os to upgrade the junos I have the issue.
The playbook looks like this