Advice on playbook for cisco command with prompt

Posted on

Hi guys, currently my playbook is catered to run a list of cisco command by using --extra-variables through a json file. However, i found out some issue where the playbook would stucked in the middle and get timeout if I use some cisco commands that will prompt for user input.

My command list:
1. show version
2. show run
3. clear counter GigabitEthernet 1/0/1
4. copy run start
5. show log

After running the playbook, it will get stuck at 3rd command and causing the playbook to stop.

I am using ios_command module. I know I can set expect and prompt in this case but it is hard for me to maintain the list of response.

Is there any other way of doing it. Advice needed. Thanks!

Responses