Cisco Routers IOSXR Ansible automation

Hi,

I have installed ‘cisco.iosxr’ ansible collection and try to run show commands through cli using Ansible on the Cisco routers.

Playbook:

- name: Retrieve software version details from Cisco IOS XR routers
  hosts: ios
  gather_facts: no
  connection: network_cli
  tasks:
  - name: Retrieve IOS-XR version
    cisco.iosxr.iosxr_command:
      commands:
        - show run
    register: version
  - name: Display software version
    debug:
      msg: "{{ version.stdout }}"

I am always getting error “msg”: “unable to set terminal parameters.”’ . Even I have try to set terminal length & width directly on routers. Still it doesn’t work.

Hi,
Did you manage to solve this issue?

I solved my issue by ios rather than using iosxr even though I am using a cisco ASR1001-X.

Hi,

the Cisco ASR1001 (and other models in the ASR 1000 series) runs Cisco IOS XE Software