i get wrong format below is my script:
---
- name: BACKUP ROUTER CONFIGURATIONS
hosts: all
connection: local
gather_facts: false
vars:
data_dir: foo
tasks:
- name: BACKUP THE CONFIG
iosxr_command:
commands:
#- { command: show run }
- { command: show logging | ex SSH }
- { command: show ospf neighbor }
- { command: show bgp all all summary }
- { command: show mpls ldp neighbor }
register: config_output
- name: RENAME BACKUP
copy:
content: "{{ config_output.stdout }}"
dest: "/var/lib/awx/projects/XR-ISP-GW-showOSPF/LOGFILE/{{ inventory_hostname }}.txt"
i got something like this:
nAddress Family: IPv4 Unicast\n----------------------------\n\nBGP router identifier 89.211.1.7, local AS number 8781\nBGP generic scan interval 60 secs\nNon-stop routing is enabled\nBGP table state: Active\nTable ID: 0xe0000000 RD version: 1579942429\nBGP main routing table version 1579942429\nBGP NSR Initial initsync version 395208 (Reached)\nBGP NSR/ISSU Sync-Group versions 1579942429/0\nBGP scan interval 60 secs\n\nBGP is operating in STANDALONE mode.\n\n\nProcess RcvTblVer bRIB/RIB LabelVer ImportVer SendTblVer StandbyVer\nSpeaker 1579942429 1579942429 1579942429 1579942429 1579942429 1579942429\n\nNeighbor Spk AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down St/PfxRcd\n72.14.198.144 0 15169 3847027 3304487 1579942429 0 0 29w3d 985\n72.14.211.141 0 15169 3994770 3430527 1579942429 0 0 23w2d 985\n82.148.106.13 0 16509 3955040 3453340 1579942429 0 0 3w0d 1405\n82.148
_________________________________________________________________________________________________________________________
how can it be solved?