How to answer to prompt in configuration mode Cisco switch

604 views
Skip to first unread message

mana maghrebi

unread,
Jul 11, 2021, 1:14:07 AM7/11/21
to Ansible Project
Hi all,

I want to configure Radius do1x in 2960 cisco switch with ansible. As soon as I run command aaa accounting identity default start-stop group, a prompt pops up saying: This operation will permanently convert all relevant authentication commands to their CPL control-policy equivalents. As this conversion is irreversible and will disable the conversion CLI 'authentication display [legacy|new-style]', you are strongly advised to back up your current configuration before proceeding.
Do you wish to continue? [yes]:
I was wondering if there are any modules in ios_config to answer the prompt similar to the ios-command.

Thank You,

Mana

rajthecomputerguy

unread,
Jul 17, 2021, 10:18:50 PM7/17/21
to Ansible Project
Try this

  cli_command:
    command: "aaa accounting identity default start-stop group"
    prompt:
      - "Do\\ you\\ wish\\ to\\ continue\\?\\ \\[yes\\]:"
    answer:
      - 'yes\r'

mana maghrebi

unread,
Jul 20, 2021, 9:00:21 PM7/20/21
to Ansible Project
Thank you! I tried the prompt with ios_config but it's not working. It's a Cisco switch it doesn't accept cli_command
Reply all
Reply to author
Forward
0 new messages