I'd like to connect to this reserved sandbox IOS XR Programmability Sandbox using NETCONF protocol.
Firstly, I tested the connection using python ncclient with below lab_env settings.
The connection is set up successfully.
IOS_XR_r1_rsv = {
"host": "10.10.20.70",
"username": "admin",
"password": "admin",
"netconf_port": 8321,
"ssh_port": 2221
}
Then, I tried Ansible Playbook using below configuration
group_var:
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: cisco.iosxr.iosxr
ansible_user: admin
ansible_ssh_pass: admin
ansible_password: admin
ansible_port: 2221
Playbook
---
- name: Configure IOS XR
hosts: iosxr-rsv
gather_facts: no
tasks:
- name: Change connection mode
set_fact:
ansible_connection: netconf
ansible_port: 8321
- name: Fetch given yang model and it’s dependent from remote host
community.yang.fetch:
name: Cisco-IOS-XR-ifmgr-cfg
dir: "{{playbook_dir}}/{{inventory_hostname}}/yang_files"
register: resultThe connection is failed.
ansible.module_utils.connection.ConnectionError: Exception('command timeout triggered, timeout value is 80 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide.')
fatal: [10.10.20.70]: FAILED! => {
"msg": "Unexpected failure during module execution.",
"stdout": ""
}Did anyone come across the similar issue?