Hi, A big thanks you it worked
Very Much appreciated On Wednesday, March 7, 2018 at 12:34:11 PM UTC, Kai Stian Olstad wrote: > On 07.03.2018 12:40, 'Daley Okuwa' via Ansible Project wrote: > > Hi, > > > > I have just done this manually on the switch and it worked > > > > User Access Verification > > Username: admin > > Password: > > POD2_C3560#copy running-config ftp: > > Address or name of remote host []? 10.241.11.237 > > Destination filename [pod2_c3560-confg]? > > Writing pod2_c3560-confg !! > > 8063 bytes copied in 1.108 secs (7277 bytes/sec) > > POD2_C3560# > > I think you forgot the exit at the end, so I included it. > > - name: run show command via Telnet using the expect module > expect: > command: telnet 10.101.250.12 > responses: > Username: admin > Password: xxxxx > POD2_C3560#: > - copy running-config ftp > - exit > Address or name of remote host \[\]\?: 10.241.11.237 > Destination filename \[.*\]\?: '' > > > The '' is the same as just pressing enter. > I have escaped []? with backslash since they are character with meaning > in regex. > Since the prompt POD2_C3560# comes up two times this is a list with the > responses. > > > > -- > Kai Stian Olstad > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ae4e9cc1-2a89-40ad-b3f0-d25347cf1513%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
