08-09-2021 06:36 PM
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: result
The 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?
08-10-2021 07:59 AM
@EvanC try to run your playbook command again with -vvv added to enable verbose output. The only time I saw this error was when a command was trying to run from a non-privileged mode.
You will get more of a response to code issues/troubleshooting code in the https://learningnetwork.cisco.com/s/topic/0TO3i0000008jY5GAI/devnet-certifications-community
Hope this helps.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide