Clarifications needed for 'prompt' parameter of ios_command module

12 views
Skip to first unread message

Vikram S

unread,
Mar 2, 2021, 4:25:12 AM3/2/21
to Ansible Project
When i use 'prompt' parameter of ios_command module for IOS image copying as in Example 1, it fails. But it succeeds as in Example 2.
I want to understand why? I am trying to understand why this below syntax works?
Destination filename \[ image name\]?'

 This issue happens only for IOS copying and not for other prompt related commands.

Example 1 (fails):
ios_command:
commands:
- command: "copy ftp://username:pass...@10.4.1.104/isr4300-universalk9.16.03.07.SPA.bin flash:"
prompt: '[isr4300-universalk9.16.03.07.SPA.bin]'
answer: "\r"

Example 2 (suceeds):
ios_command:
commands:
- command: "copy ftp://username:pass...@10.4.1.104/isr4300-universalk9.16.03.07.SPA.bin flash:"
prompt: 'Destination filename \[ isr4300-universalk9.16.03.07.SPA.bin\]?'
answer: "\r"
Reply all
Reply to author
Forward
0 new messages