# telnet config output is not complete

**URL:** <https://forum.ansible.com/t/telnet-config-output-is-not-complete/35484>\
**Category:** Ansible Project\
**Created:** [July 9, 2021, 5:14am UTC](https://forum.ansible.com/t/telnet-config-output-is-not-complete/35484 "2021-07-09T05:14:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent\_Nambatac](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vincent\_Nambatac](https://forum.ansible.com/u/Vincent_Nambatac)\
**Post date:** [July 9, 2021, 5:14am UTC](https://forum.ansible.com/t/telnet-config-output-is-not-complete/35484/1 "2021-07-09T05:14:58Z")

</div>

Hi I would like to ask if how can I make a conditional statement for waiting the output to be complete before registering it . I manage to get the config in my router using telnet but then the config output is not complete.

here is my script:

- name: AUTOMATIC BACKUP OF RUNNING-CONFIG FOR RUIJIE  
hosts: telnet  
connection: network\_cli  
gather\_facts: true  
tasks:
- name: Backup ruijie  
telnet:  
user: [username]  
password: [password]  
login\_prompt: 'Username: ’  
password\_prompt: ‘Password:’  
prompts:
- “[\>#]”  
command:
- terminal length 0
- sh run  
register: config
- name: SAVE OUTPUT TO ./backups/  
copy:  
content: “{{ config.output[1] }}”  
dest: “./backups/{{ inventory\_hostname }}-config.txt”
