Open t-r3xous opened 1 year ago
Hey @t-r3xous do you mean that the output is duplicated instead of being unique to the appliance? And not the whole output some set of lines out of the whole set of output? Regards
Hello,
It's like it writes the first n lines of configuration and and at that point it starts again from the first line and this time writes the full config. For ex: ! ! version 16.9 no service pad service tcp-keepalives-in service tcp-keepalives-out service timestamps debug datetime msec localtime service timestamps log datetime msec localtime service password-encryption service sequence-numbers platform qfp utilization monitor load 80 no platform punt-keepalive disable-kernel-core platform hardware crypto-throughput level 8-16g ! hostname INTRANET_ASR2 ! boot-start-marker boot system flash bootflash:/asr1000-universalk9.16.09.03.SPA.bin boot-end-marker ! ! vrf definition Mgmt-intf ! address-family ipv4 exit-address-family ! address-family ipv6 exit-address-family ! security authentication failure rate 10 log security passwords min-length 6 logging buffered 65535 logging persistent logging console critical ! aaa new-model ! ! aaa session-id common process cpu threshold type total rising 80 interval 60 falling 60 interval 30 clock timezone EET 2 0 clock summer-time EET recurring last Sun Mar 3:00 last Sun Oct 3:00 no ip source-route no ip gratuitous-arps
! no ip bootp server no ip domain lookup ip domain name example.com ! ! ! login block-for 30 attempts 5 within 5 login on-success log ! no subscriber templating ! crypto pki trustpoint TP-self-signed-1859211069 enrollment selfsigned subject-name cn=IOS-Self-Signed-Certificate-1859211069 revocation-check none rsakeypair TP-self-signed-1859211069 ! ! crypto pki certificate chain TP-self-signed-1859211069 ! license accept end user agreement no license smart enable file prompt quiet ! spanning-tree mode pvst spanning-tree logging spanning-tree extend system-id no diagnostic bootup level archive log config logging enable logging size 1000 notify syslog contenttype plaintext hidekeys ! username test privilege 15 password 7 1111111111111111 ! redundancy mode none ! cdp run ! ! HERE THE CONFIG RESTARTS !!! ! version 16.9 no service pad service tcp-keepalives-in service tcp-keepalives-out service timestamps debug datetime msec localtime service timestamps log datetime msec localtime service password-encryption service sequence-numbers platform qfp utilization monitor load 80 no platform punt-keepalive disable-kernel-core platform hardware crypto-throughput level 8-16g ! hostname INTRANET_ASR2 ! boot-start-marker boot system flash bootflash:/asr1000-universalk9.16.09.03.SPA.bin boot-end-marker ! ! vrf definition Mgmt-intf ! address-family ipv4 exit-address-family ! address-family ipv6 exit-address-family ! security authentication failure rate 10 log security passwords min-length 6 logging buffered 65535 logging persistent logging console critical ! aaa new-model
...the rest of the config
Hey @t-r3xous I tried reproducing this on my end. could you please try adding a meta-reset task after your play?
- name: Reset ssh connection
ansible.builtin.meta: reset_connection
Regards.
Hello,
I tried that and no change (still 4-5 out of 600 have that duplication in their config).
The playbook now is:
name: BACKUP IOS ROUTERS CONFIGS hosts: group_ios12,group_ios15,group_iosxe gather_facts: no vars_files: vault.yml tasks:
name: GIT PUSH ROUTERS CONFIGS hosts: localhost gather_facts: no vars_files: vault.yml tasks:
SUMMARY
Running a playbook task like:
For 3-4 routers out of 600 in inventory the first 100 to 500 lines are duplicated in the output {{ show_run.stdout[0] }}:
starting line1:
I checked and this happens on routers running ios 12.x,15.x,16.x,17.x
ISSUE TYPE
COMPONENT NAME
ios_command
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
ios 12.2, 15.1, 16.9, 17.3
STEPS TO REPRODUCE
EXPECTED RESULTS
router config
ACTUAL RESULTS